(* Content-type: application/mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 7.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       145,          7]
NotebookDataLength[    224444,       5349]
NotebookOptionsPosition[    221060,       5234]
NotebookOutlinePosition[    221421,       5250]
CellTagsIndexPosition[    221378,       5247]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell["Online Ordinal Label Extraction", "Section",
 CellChangeTimes->{{3.5259870522347393`*^9, 3.525987056087652*^9}}],

Cell[CellGroupData[{

Cell["Likelihood", "Subsection",
 CellChangeTimes->{{3.5259871234156446`*^9, 3.525987128101921*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"Clear", "[", "polytomousrasch", "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"polytomousrasch", "[", 
    RowBox[{"0", ",", " ", "z_", ",", " ", "\[Beta]_", ",", " ", "\[Tau]_"}], 
    "]"}], " ", ":=", " ", 
   RowBox[{"1", " ", "/", " ", 
    RowBox[{"(", 
     RowBox[{"1", " ", "+", " ", 
      RowBox[{"Sum", "[", 
       RowBox[{
        RowBox[{"Exp", "[", 
         RowBox[{"Sum", "[", 
          RowBox[{
           RowBox[{"\[Beta]", " ", 
            RowBox[{"(", 
             RowBox[{"z", " ", "-", " ", 
              RowBox[{"\[Tau]", "[", 
               RowBox[{"[", "k", "]"}], "]"}]}], ")"}]}], ",", " ", 
           RowBox[{"{", " ", 
            RowBox[{"k", ",", " ", "1", ",", " ", "y"}], " ", "}"}]}], "]"}], 
         "]"}], ",", " ", 
        RowBox[{"{", " ", 
         RowBox[{"y", ",", " ", "1", ",", " ", 
          RowBox[{"Length", "[", "\[Tau]", "]"}]}], "}"}]}], "]"}]}], 
     ")"}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"polytomousrasch", "[", 
    RowBox[{"x_", ",", " ", "z_", ",", " ", "\[Beta]_", ",", " ", "\[Tau]_"}],
     " ", "]"}], " ", ":=", " ", 
   RowBox[{
    RowBox[{"Exp", "[", 
     RowBox[{"Sum", "[", 
      RowBox[{
       RowBox[{"\[Beta]", " ", 
        RowBox[{"(", 
         RowBox[{"z", "-", " ", 
          RowBox[{"\[Tau]", "[", 
           RowBox[{"[", "k", "]"}], "]"}]}], ")"}]}], ",", " ", 
       RowBox[{"{", " ", 
        RowBox[{"k", ",", " ", "1", ",", " ", "x"}], " ", "}"}]}], "]"}], 
     "]"}], " ", "/", " ", 
    RowBox[{"(", 
     RowBox[{"1", " ", "+", " ", 
      RowBox[{"Sum", "[", 
       RowBox[{
        RowBox[{"Exp", "[", 
         RowBox[{"Sum", "[", 
          RowBox[{
           RowBox[{"\[Beta]", " ", 
            RowBox[{"(", 
             RowBox[{"z", " ", "-", " ", 
              RowBox[{"\[Tau]", "[", 
               RowBox[{"[", "k", "]"}], "]"}]}], ")"}]}], ",", " ", 
           RowBox[{"{", " ", 
            RowBox[{"k", ",", " ", "1", ",", " ", "y"}], " ", "}"}]}], "]"}], 
         "]"}], ",", " ", 
        RowBox[{"{", " ", 
         RowBox[{"y", ",", " ", "1", ",", " ", 
          RowBox[{"Length", "[", "\[Tau]", "]"}]}], "}"}]}], "]"}]}], 
     ")"}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Clear", "[", "dlogprdbeta", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"dlogprdbeta", "[", 
    RowBox[{"0", ",", " ", "z_", ",", " ", "\[Beta]_", ",", " ", "\[Tau]_"}], 
    "]"}], " ", ":=", " ", 
   RowBox[{
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"Log", "[", 
       RowBox[{"polytomousrasch", "[", 
        RowBox[{"0", ",", " ", "z", ",", " ", "\[Chi]", ",", " ", "\[Tau]"}], 
        "]"}], "]"}], ",", " ", "\[Chi]"}], "]"}], " ", "/.", " ", 
    RowBox[{"\[Chi]", " ", "\[Rule]", " ", "\[Beta]"}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"dlogprdbeta", "[", 
    RowBox[{"x_", ",", " ", "z_", ",", " ", "\[Beta]_", ",", " ", "\[Tau]_"}],
     "]"}], " ", ":=", " ", 
   RowBox[{
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"Log", "[", 
       RowBox[{"polytomousrasch", "[", 
        RowBox[{"x", ",", " ", "z", ",", " ", "\[Chi]", ",", " ", "\[Tau]"}], 
        "]"}], "]"}], ",", " ", "\[Chi]"}], "]"}], " ", "/.", " ", 
    RowBox[{"\[Chi]", " ", "\[Rule]", " ", "\[Beta]"}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Clear", "[", "ddlogprddbeta", "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"ddlogprddbeta", "[", 
    RowBox[{"0", ",", " ", "z_", ",", " ", "\[Beta]_", ",", " ", "\[Tau]_"}], 
    "]"}], " ", ":=", " ", 
   RowBox[{
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"Log", "[", 
       RowBox[{"polytomousrasch", "[", 
        RowBox[{"0", ",", " ", "z", ",", " ", "\[Chi]", ",", " ", "\[Tau]"}], 
        "]"}], "]"}], ",", " ", 
      RowBox[{"{", " ", 
       RowBox[{"\[Chi]", ",", " ", "2"}], " ", "}"}]}], "]"}], " ", "/.", " ", 
    RowBox[{"\[Chi]", " ", "\[Rule]", " ", "\[Beta]"}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"ddlogprddbeta", "[", 
    RowBox[{"x_", ",", " ", "z_", ",", " ", "\[Beta]_", ",", " ", "\[Tau]_"}],
     "]"}], " ", ":=", " ", 
   RowBox[{
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"Log", "[", 
       RowBox[{"polytomousrasch", "[", 
        RowBox[{"x", ",", " ", "z", ",", " ", "\[Chi]", ",", " ", "\[Tau]"}], 
        "]"}], "]"}], ",", " ", 
      RowBox[{"{", " ", 
       RowBox[{"\[Chi]", ",", " ", "2"}], " ", "}"}]}], "]"}], " ", "/.", " ", 
    RowBox[{"\[Chi]", " ", "\[Rule]", " ", "\[Beta]"}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Clear", "[", "makevararray", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"makevararray", "[", 
    RowBox[{"s_", ",", " ", "n_"}], "]"}], " ", ":=", " ", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"ToExpression", "[", 
      RowBox[{"s", " ", "<>", " ", 
       RowBox[{"ToString", "[", "i", "]"}]}], "]"}], ",", " ", 
     RowBox[{"{", " ", 
      RowBox[{"i", ",", " ", "1", ",", " ", "n"}], " ", "}"}]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"dlogprdtau", "[", 
     RowBox[{"0", ",", " ", "z_", ",", " ", "\[Beta]_", ",", " ", "\[Tau]_"}],
      "]"}], " ", ":=", " ", 
    RowBox[{"Module", "[", 
     RowBox[{
      RowBox[{"{", "tmp", "}"}], ",", "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{"tmp", " ", "=", " ", 
        RowBox[{"makevararray", "[", 
         RowBox[{"\"\<\[Tau]\>\"", ",", " ", 
          RowBox[{"Length", "[", "\[Tau]", "]"}]}], "]"}]}], ";", 
       "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"D", "[", 
         RowBox[{
          RowBox[{"Log", "[", 
           RowBox[{"polytomousrasch", "[", 
            RowBox[{
            "0", ",", " ", "z", ",", " ", "\[Beta]", ",", " ", "tmp"}], "]"}],
            "]"}], ",", " ", 
          RowBox[{"{", " ", "tmp", " ", "}"}]}], "]"}], " ", "/.", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{
           RowBox[{"ToExpression", "[", 
            RowBox[{
             RowBox[{"ToString", "[", 
              RowBox[{"#", "[", 
               RowBox[{"[", "1", "]"}], "]"}], "]"}], " ", "<>", " ", 
             "\"\< -> \>\"", " ", "<>", " ", 
             RowBox[{"ToString", "[", 
              RowBox[{"#", "[", 
               RowBox[{"[", "2", "]"}], "]"}], "]"}]}], "]"}], "&"}], " ", "/@",
           " ", 
          RowBox[{"Transpose", "[", 
           RowBox[{"{", " ", 
            RowBox[{
             RowBox[{"makevararray", "[", 
              RowBox[{"\"\<\[Tau]\>\"", ",", " ", 
               RowBox[{"Length", "[", "\[Tau]", "]"}]}], "]"}], ",", " ", 
             "\[Tau]"}], " ", "}"}], "]"}]}], ")"}]}]}]}], 
     "\[IndentingNewLine]", "]"}]}], ";"}], " "}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"dlogprdtau", "[", 
     RowBox[{
     "x_", ",", " ", "z_", " ", ",", " ", "\[Beta]_", ",", " ", "\[Tau]_"}], 
     "]"}], " ", ":=", " ", 
    RowBox[{"Module", "[", 
     RowBox[{
      RowBox[{"{", "tmp", "}"}], ",", "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{"tmp", " ", "=", " ", 
        RowBox[{"makevararray", "[", 
         RowBox[{"\"\<\[Tau]\>\"", ",", " ", 
          RowBox[{"Length", "[", "\[Tau]", "]"}]}], "]"}]}], ";", 
       "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"D", "[", 
         RowBox[{
          RowBox[{"Log", "[", 
           RowBox[{"polytomousrasch", "[", 
            RowBox[{
            "x", ",", " ", "z", ",", " ", "\[Beta]", ",", " ", "tmp"}], "]"}],
            "]"}], ",", " ", 
          RowBox[{"{", " ", "tmp", " ", "}"}]}], "]"}], " ", "/.", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{
           RowBox[{"ToExpression", "[", 
            RowBox[{
             RowBox[{"ToString", "[", 
              RowBox[{"#", "[", 
               RowBox[{"[", "1", "]"}], "]"}], "]"}], " ", "<>", " ", 
             "\"\< -> \>\"", " ", "<>", " ", 
             RowBox[{"ToString", "[", 
              RowBox[{"#", "[", 
               RowBox[{"[", "2", "]"}], "]"}], "]"}]}], "]"}], "&"}], " ", "/@",
           " ", 
          RowBox[{"Transpose", "[", 
           RowBox[{"{", " ", 
            RowBox[{
             RowBox[{"makevararray", "[", 
              RowBox[{"\"\<\[Tau]\>\"", ",", " ", 
               RowBox[{"Length", "[", "\[Tau]", "]"}]}], "]"}], ",", " ", 
             "\[Tau]"}], " ", "}"}], "]"}]}], ")"}]}]}]}], 
     "\[IndentingNewLine]", "]"}]}], ";"}], " "}]}], "Input",
 CellChangeTimes->{{3.5259871600778437`*^9, 3.5259871884606323`*^9}, {
   3.525987243278949*^9, 3.5259872435773573`*^9}, 3.525987342475374*^9, 
   3.525988904818997*^9, {3.526428040787661*^9, 3.5264281068419237`*^9}, {
   3.526428142427841*^9, 3.52642820567033*^9}, {3.526428240978441*^9, 
   3.5264282710012493`*^9}, {3.527108233865093*^9, 3.5271082563890657`*^9}, {
   3.527110018368086*^9, 3.5271101416676483`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"{", " ", 
    RowBox[{"#", ",", " ", 
     RowBox[{"{", " ", 
      RowBox[{
       RowBox[{"Log", "[", 
        RowBox[{"polytomousrasch", "[", 
         RowBox[{
          RowBox[{"#", "[", 
           RowBox[{"[", "1", "]"}], "]"}], ",", " ", 
          RowBox[{"#", "[", 
           RowBox[{"[", "2", "]"}], "]"}], ",", " ", 
          RowBox[{"#", "[", 
           RowBox[{"[", "3", "]"}], "]"}], ",", " ", 
          RowBox[{"#", "[", 
           RowBox[{"[", "4", "]"}], "]"}]}], "]"}], "]"}], ",", " ", 
       RowBox[{"dlogprdbeta", "[", 
        RowBox[{
         RowBox[{"#", "[", 
          RowBox[{"[", "1", "]"}], "]"}], ",", " ", 
         RowBox[{"#", "[", 
          RowBox[{"[", "2", "]"}], "]"}], ",", " ", 
         RowBox[{"#", "[", 
          RowBox[{"[", "3", "]"}], "]"}], ",", " ", 
         RowBox[{"#", "[", 
          RowBox[{"[", "4", "]"}], "]"}]}], "]"}], ",", " ", 
       "\[IndentingNewLine]", 
       RowBox[{"ddlogprddbeta", "[", 
        RowBox[{
         RowBox[{"#", "[", 
          RowBox[{"[", "1", "]"}], "]"}], ",", " ", 
         RowBox[{"#", "[", 
          RowBox[{"[", "2", "]"}], "]"}], ",", " ", 
         RowBox[{"#", "[", 
          RowBox[{"[", "3", "]"}], "]"}], ",", " ", 
         RowBox[{"#", "[", 
          RowBox[{"[", "4", "]"}], "]"}]}], "]"}], ",", " ", 
       "\[IndentingNewLine]", 
       RowBox[{"dlogprdtau", "[", 
        RowBox[{
         RowBox[{"#", "[", 
          RowBox[{"[", "1", "]"}], "]"}], ",", " ", 
         RowBox[{"#", "[", 
          RowBox[{"[", "2", "]"}], "]"}], ",", " ", 
         RowBox[{"#", "[", 
          RowBox[{"[", "3", "]"}], "]"}], ",", " ", 
         RowBox[{"#", "[", 
          RowBox[{"[", "4", "]"}], "]"}]}], "]"}]}], " ", "}"}]}], "}"}], " ",
    "&"}], " ", "/@", " ", 
  RowBox[{"Table", "[", 
   RowBox[{
    RowBox[{"{", " ", 
     RowBox[{
      RowBox[{"Random", "[", 
       RowBox[{"Integer", ",", " ", "5"}], "]"}], ",", " ", 
      RowBox[{"Random", "[", 
       RowBox[{"Integer", ",", " ", "5"}], "]"}], ",", 
      RowBox[{"Random", "[", 
       RowBox[{"Real", ",", " ", "5"}], "]"}], ",", " ", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{"Random", "[", 
         RowBox[{"Real", ",", " ", "5"}], "]"}], ",", " ", 
        RowBox[{"{", " ", 
         RowBox[{"i", ",", " ", "1", ",", " ", "5"}], " ", "}"}]}], "]"}]}], 
     " ", "}"}], ",", " ", 
    RowBox[{"{", " ", 
     RowBox[{"foo", ",", " ", "1", ",", " ", "10"}], " ", "}"}]}], 
   "]"}]}]], "Input",
 CellChangeTimes->{{3.5054890146140127`*^9, 3.505489111203616*^9}, {
  3.505489152470233*^9, 3.505489160385252*^9}, {3.505489233064039*^9, 
  3.505489254376178*^9}, {3.525987232058299*^9, 3.525987237342202*^9}, {
  3.5259875928242903`*^9, 3.525987595620069*^9}, {3.52642821541916*^9, 
  3.526428253326068*^9}, {3.526430575738278*^9, 3.52643057912243*^9}, {
  3.52711015445131*^9, 3.52711015756151*^9}, {3.527110194905159*^9, 
  3.527110206935774*^9}, {3.5271255976205053`*^9, 3.527125601550914*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"2", ",", "1", ",", "2.4318754958451954`", ",", 
       RowBox[{"{", 
        RowBox[{
        "2.2395940878442113`", ",", "2.8795948867800774`", ",", 
         "4.2927872657477275`", ",", "1.9404623517938497`", ",", 
         "1.0816528274647343`"}], "}"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "7.6338659339200055`"}], ",", 
       RowBox[{"-", "3.0597267576904867`"}], ",", 
       RowBox[{"-", "0.07301630328733566`"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "2.3170054409262324`"}], ",", 
         RowBox[{"-", "2.430698497029228`"}], ",", "4.640682600999213`*^-7", 
         ",", "7.239471192553448`*^-8", ",", "3.261539592424913`*^-8"}], 
        "}"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"5", ",", "2", ",", "2.9545582237267176`", ",", 
       RowBox[{"{", 
        RowBox[{
        "2.5313317073938117`", ",", "0.49752979347141735`", ",", 
         "1.1926077401604276`", ",", "1.387633899166429`", ",", 
         "1.9462863888085893`"}], "}"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "0.696509652739211`"}], ",", "0.07978000117677479`", ",", 
       
       RowBox[{"-", "0.042515928805796084`"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "0.0010744916539019449`"}], ",", 
         RowBox[{"-", "0.0012980690236712486`"}], ",", 
         RowBox[{"-", "0.020235441380911823`"}], ",", 
         RowBox[{"-", "0.22597644366365863`"}], ",", 
         RowBox[{"-", "1.48224472844765`"}]}], "}"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"5", ",", "1", ",", "4.10564605409737`", ",", 
       RowBox[{"{", 
        RowBox[{
        "1.346576682032351`", ",", "4.195073445742547`", ",", 
         "2.862678486124132`", ",", "2.2547386550966273`", ",", 
         "4.053602669513621`"}], "}"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "40.09271012058487`"}], ",", 
       RowBox[{"-", "9.645361989396257`"}], ",", 
       RowBox[{"-", "0.018801425881150635`"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "3.3083204559088535`"}], ",", 
         RowBox[{"-", "4.105644451429375`"}], ",", 
         RowBox[{"-", "4.1056460533284636`"}], ",", 
         RowBox[{"-", "4.105646054092944`"}], ",", 
         RowBox[{"-", "4.10564605409737`"}]}], "}"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"3", ",", "2", ",", "1.087176854992913`", ",", 
       RowBox[{"{", 
        RowBox[{
        "2.5311821491851756`", ",", "1.12919599922833`", ",", 
         "2.7248354449194774`", ",", "1.725700797484975`", ",", 
         "4.683976115128476`"}], "}"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "1.94486716306075`"}], ",", 
       RowBox[{"-", "0.3216353912659968`"}], ",", 
       RowBox[{"-", "0.1715979521365798`"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "0.23633973864652902`"}], ",", 
         RowBox[{"-", "0.36899897909603424`"}], ",", 
         RowBox[{"-", "0.7108918154159062`"}], ",", "0.22081266314836678`", 
         ",", "0.011321683132668405`"}], "}"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"3", ",", "1", ",", "3.6973205033831347`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.4852413570752663`", ",", "3.846105910704898`", ",", 
         "0.3911888493807483`", ",", "1.7568581515892854`", ",", 
         "4.403588529610532`"}], "}"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "8.411222535911833`"}], ",", 
       RowBox[{"-", "2.169920768681799`"}], ",", 
       RowBox[{"-", "0.031254920399995`"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "0.4795787292079094`"}], ",", 
         RowBox[{"-", "3.6963617460873586`"}], ",", 
         RowBox[{"-", "3.6964483124655123`"}], ",", 
         "0.000050075422546613134`", ",", "1.7154992975104008`*^-10"}], 
        "}"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"5", ",", "3", ",", "0.8915476869781801`", ",", 
       RowBox[{"{", 
        RowBox[{
        "2.8598571419869363`", ",", "1.259328358117868`", ",", 
         "3.210980789450104`", ",", "4.503913787811752`", ",", 
         "0.913570753178347`"}], "}"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "1.013400612704834`"}], ",", "0.5668823575162715`", ",", 
       RowBox[{"-", "0.5273830928483088`"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "0.04344447010050033`"}], ",", 
         RowBox[{"-", "0.09267062402311838`"}], ",", 
         RowBox[{"-", "0.32503701057629697`"}], ",", 
         RowBox[{"-", "0.5175602069949574`"}], ",", 
         RowBox[{"-", "0.5679308822427508`"}]}], "}"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"3", ",", "0", ",", "2.1536823040204975`", ",", 
       RowBox[{"{", 
        RowBox[{
        "1.8644041074177533`", ",", "0.3088403420692045`", ",", 
         "3.0508922670542153`", ",", "4.89894364892387`", ",", 
         "2.810801437904132`"}], "}"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "11.278088648390417`"}], ",", 
       RowBox[{"-", "5.171717130162945`"}], ",", 
       RowBox[{"-", "0.10126487699416487`"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "2.096398739100223`"}], ",", 
         RowBox[{"-", "2.1342116641930593`"}], ",", 
         RowBox[{"-", "2.1536550652472783`"}], ",", "7.145922385791519`*^-10",
          ",", "1.6749698429619125`*^-12"}], "}"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"1", ",", "0", ",", "4.221663487076292`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.5197101178690398`", ",", "3.76974764969554`", ",", 
         "0.08596599298465471`", ",", "2.495962689591317`", ",", 
         "0.835734002740564`"}], "}"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "2.2997205562632166`"}], ",", 
       RowBox[{"-", "0.46758992963996987`"}], ",", 
       RowBox[{"-", "0.024371218173555365`"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "3.798285816106239`"}], ",", "8.799076968473889`*^-8", 
         ",", "3.6099060077040006`*^-8", ",", "9.859269403398216`*^-13", ",", 
         "2.8119384105176822`*^-14"}], "}"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0", ",", "2", ",", "0.07242714631240535`", ",", 
       RowBox[{"{", 
        RowBox[{
        "4.600724635909389`", ",", "3.649856778886419`", ",", 
         "0.4445451533598156`", ",", "3.3155689947231206`", ",", 
         "0.19713610629885658`"}], "}"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "1.606659853265808`"}], ",", "2.482256488597331`", ",", 
       RowBox[{"-", "2.0697944428445743`"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.05790142123308777`", ",", "0.04586955688434932`", ",", 
         "0.035192856411365506`", ",", "0.023242979139487332`", ",", 
         "0.012379158866600832`"}], "}"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"3", ",", "2", ",", "2.758309091908239`", ",", 
       RowBox[{"{", 
        RowBox[{
        "2.5846880113728794`", ",", "2.056240636605252`", ",", 
         "1.9861553168487522`", ",", "3.254395304096488`", ",", 
         "1.6711172581945324`"}], "}"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "2.1786970783749524`"}], ",", 
       RowBox[{"-", "0.39151101512852776`"}], ",", 
       RowBox[{"-", "0.11110192463708093`"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "1.7605312120472552`"}], ",", 
         RowBox[{"-", "2.11147116147267`"}], ",", 
         RowBox[{"-", "2.411983201927624`"}], ",", "0.0341200171333729`", ",",
          "0.024307685798239304`"}], "}"}]}], "}"}]}], "}"}]}], 
  "}"}]], "Output",
 CellChangeTimes->{
  3.525987207491303*^9, {3.5259872384118137`*^9, 3.52598724657666*^9}, {
   3.525987344691986*^9, 3.525987355068604*^9}, 3.525987596070009*^9, 
   3.5264276517252407`*^9, {3.526428256276692*^9, 3.526428272781323*^9}, {
   3.5264305764262257`*^9, 3.526430580364725*^9}, 3.527036189484869*^9, 
   3.527108263034478*^9, 3.527110164860675*^9, 3.527110207486527*^9, 
   3.52712560224807*^9}]
}, Open  ]]
}, Closed]],

Cell[CellGroupData[{

Cell["E - Step", "Subsection",
 CellChangeTimes->{{3.525095319326301*^9, 3.525095320059371*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"Clear", "[", "clampprior", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"clampprior", "[", 
    RowBox[{"c_", ",", " ", "logpriorz_"}], "]"}], " ", ":=", " ", 
   RowBox[{"If", "[", 
    RowBox[{
     RowBox[{"c", " ", "<", " ", "0"}], ",", " ", "logpriorz", ",", " ", 
     RowBox[{"Table", "[", 
      RowBox[{
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{"i", " ", "\[Equal]", " ", 
          RowBox[{"c", " ", "+", " ", "1"}]}], ",", " ", 
         RowBox[{"Log", "[", "0.99999", "]"}], ",", " ", 
         RowBox[{
          RowBox[{"Log", "[", "0.00001", "]"}], " ", "-", " ", 
          RowBox[{"Log", "[", 
           RowBox[{
            RowBox[{"Length", "[", "logpriorz", "]"}], " ", "-", " ", "1"}], 
           "]"}]}]}], "]"}], ",", " ", 
       RowBox[{"{", " ", 
        RowBox[{"i", ",", " ", "1", ",", " ", 
         RowBox[{"Length", "[", "logpriorz", "]"}]}], " ", "}"}]}], "]"}]}], 
    "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Clear", "[", "estep", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"estep", "[", 
    RowBox[{
    "logpriorz_", ",", " ", "d_", ",", " ", "log\[Alpha]_", ",", " ", 
     "log\[Lambda]_", ",", " ", "\[Tau]_", ",", " ", "clamp_"}], "]"}], " ", ":=",
    " ", 
   RowBox[{"Module", "[", 
    RowBox[{
     RowBox[{"{", " ", 
      RowBox[{
       RowBox[{"logz", " ", "=", " ", 
        RowBox[{"clampprior", "[", 
         RowBox[{"clamp", ",", " ", "logpriorz"}], "]"}]}], ",", 
       "\[IndentingNewLine]", "              ", "x", ",", " ", "y", ",", 
       "\[IndentingNewLine]", "              ", "worker", ",", 
       "\[IndentingNewLine]", "              ", "rating"}], "}"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"For", "[", 
       RowBox[{
        RowBox[{"x", " ", "=", " ", "1"}], ",", " ", 
        RowBox[{"x", " ", "\[LessEqual]", " ", 
         RowBox[{"Length", "[", "d", "]"}]}], ",", " ", 
        RowBox[{"++", "x"}], ",", " ", "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{"worker", " ", "=", " ", 
          RowBox[{
           RowBox[{"d", "[", 
            RowBox[{"[", "x", "]"}], "]"}], "[", 
           RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", 
         RowBox[{"rating", " ", "=", " ", 
          RowBox[{
           RowBox[{"d", "[", 
            RowBox[{"[", "x", "]"}], "]"}], "[", 
           RowBox[{"[", "2", "]"}], "]"}]}], ";", "\[IndentingNewLine]", 
         RowBox[{"For", "[", 
          RowBox[{
           RowBox[{"y", " ", "=", " ", "1"}], ",", " ", 
           RowBox[{"y", " ", "\[LessEqual]", " ", 
            RowBox[{"Length", "[", "logpriorz", "]"}]}], ",", " ", 
           RowBox[{"++", "y"}], ",", "\[IndentingNewLine]", 
           RowBox[{
            RowBox[{"logz", "[", 
             RowBox[{"[", "y", "]"}], "]"}], " ", "+=", 
            RowBox[{"Log", "[", 
             RowBox[{"polytomousrasch", "[", 
              RowBox[{"rating", ",", 
               RowBox[{"(", 
                RowBox[{"y", " ", "-", " ", "1"}], ")"}], ",", 
               RowBox[{
                RowBox[{"Exp", "[", "log\[Alpha]", "]"}], " ", 
                RowBox[{"Exp", "[", 
                 RowBox[{"log\[Lambda]", "[", 
                  RowBox[{"[", "worker", "]"}], "]"}], "]"}]}], ",", 
               RowBox[{"\[Tau]", "[", 
                RowBox[{"[", "worker", "]"}], "]"}]}], "]"}], "]"}]}]}], 
          "\[IndentingNewLine]", "]"}]}]}], "\[IndentingNewLine]", "]"}], ";",
       "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{"Exp", "[", 
        RowBox[{"logz", " ", "-", " ", 
         RowBox[{"Max", "[", "logz", "]"}]}], "]"}], " ", "/", " ", 
       RowBox[{"(", 
        RowBox[{"Plus", " ", "@@", " ", 
         RowBox[{"Exp", "[", 
          RowBox[{"logz", " ", "-", " ", 
           RowBox[{"Max", "[", "logz", "]"}]}], "]"}]}], ")"}]}]}]}], 
    "\[IndentingNewLine]", "]"}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.503955461771839*^9, 3.503955547544071*^9}, {
   3.503956414315634*^9, 3.50395641749085*^9}, {3.504015123048579*^9, 
   3.504015144260337*^9}, {3.5040198586581793`*^9, 3.5040198610794373`*^9}, {
   3.504020706633234*^9, 3.504020834052479*^9}, {3.5040323138246193`*^9, 
   3.504032315116683*^9}, {3.525095358212021*^9, 3.525095394107882*^9}, {
   3.525095430271084*^9, 3.525095527225823*^9}, {3.525095825399502*^9, 
   3.525095905551168*^9}, {3.525095987054782*^9, 3.525095987476919*^9}, {
   3.52598891948461*^9, 3.5259889309018373`*^9}, {3.525988962558785*^9, 
   3.525989080996099*^9}, {3.5259891548282547`*^9, 3.5259891590757933`*^9}, {
   3.527038505467194*^9, 3.527038526780528*^9}, 3.5271084192988977`*^9, {
   3.527108455235469*^9, 3.527108458778479*^9}, {3.5271114792026*^9, 
   3.5271114792964582`*^9}, {3.527111984314334*^9, 3.5271119858699093`*^9}}],

Cell[CellGroupData[{

Cell["Test Vectors for estep clamp", "Subsubsection",
 CellChangeTimes->{{3.50401932583255*^9, 3.504019328703233*^9}, {
  3.504185890254962*^9, 3.504185890709035*^9}, {3.5042036574835863`*^9, 
  3.504203657569166*^9}, {3.504916768505199*^9, 3.504916769023423*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"Clear", "[", "nworkers", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"nworkers", " ", "=", " ", "4"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Clear", "[", "nlabels", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"nlabels", " ", "=", " ", "5"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Clear", "[", "nratings", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"nratings", " ", "=", " ", "6"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"#", "[", 
      RowBox[{"[", "1", "]"}], "]"}], ",", " ", 
     RowBox[{"Flatten", "[", 
      RowBox[{"#", "[", 
       RowBox[{"[", "2", "]"}], "]"}], "]"}]}], "}"}], "&"}], " ", "/@", 
  "\[IndentingNewLine]", 
  RowBox[{"(", 
   RowBox[{
    RowBox[{
     RowBox[{"{", " ", 
      RowBox[{
       RowBox[{
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{
            RowBox[{"ListQ", "[", "#", "]"}], " ", "&&", " ", 
            RowBox[{"(", 
             RowBox[{
              RowBox[{"!", " ", 
               RowBox[{"ListQ", "[", 
                RowBox[{"#", "[", 
                 RowBox[{"[", "1", "]"}], "]"}], "]"}]}], " ", "||", " ", 
              RowBox[{"!", " ", 
               RowBox[{"IntegerQ", "[", 
                RowBox[{
                 RowBox[{"#", "[", 
                  RowBox[{"[", "1", "]"}], "]"}], "[", 
                 RowBox[{"[", "1", "]"}], "]"}], "]"}]}]}], ")"}]}], ",", " ", 
           RowBox[{"Flatten", "[", "#", "]"}], ",", " ", "#"}], "]"}], "&"}], 
        " ", "/@", " ", "#"}], ",", " ", "\[IndentingNewLine]", 
       RowBox[{"estep", "[", "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{"#", "[", 
          RowBox[{"[", "1", "]"}], "]"}], ",", " ", 
         RowBox[{"(*", " ", "priorz", " ", "*)"}], "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{
           RowBox[{"{", 
            RowBox[{
             RowBox[{"1", "+", 
              RowBox[{"#", "[", 
               RowBox[{"[", "1", "]"}], "]"}]}], ",", 
             RowBox[{"#", "[", 
              RowBox[{"[", "2", "]"}], "]"}]}], "}"}], "&"}], " ", "/@", " ", 
          
          RowBox[{"#", "[", 
           RowBox[{"[", "2", "]"}], "]"}]}], ",", " ", 
         RowBox[{"(*", " ", "d", " ", "*)"}], "\[IndentingNewLine]", 
         RowBox[{"#", "[", 
          RowBox[{"[", "3", "]"}], "]"}], ",", " ", 
         RowBox[{"(*", " ", "log\[Alpha]", " ", "*)"}], "\[IndentingNewLine]", 
         RowBox[{"#", "[", 
          RowBox[{"[", "4", "]"}], "]"}], ",", " ", 
         RowBox[{"(*", " ", "log\[Lambda]", " ", "*)"}], 
         "\[IndentingNewLine]", 
         RowBox[{"Table", "[", 
          RowBox[{
           RowBox[{"Table", "[", 
            RowBox[{
             RowBox[{"j", "  ", "-", " ", "0.5", " ", "+", " ", 
              RowBox[{
               RowBox[{
                RowBox[{"#", "[", 
                 RowBox[{"[", "5", "]"}], "]"}], "[", 
                RowBox[{"[", "k", "]"}], "]"}], "[", 
               RowBox[{"[", "j", "]"}], "]"}]}], ",", 
             RowBox[{"{", " ", 
              RowBox[{"j", ",", " ", "1", ",", " ", 
               RowBox[{"Length", "[", 
                RowBox[{
                 RowBox[{"#", "[", 
                  RowBox[{"[", "5", "]"}], "]"}], "[", 
                 RowBox[{"[", "k", "]"}], "]"}], "]"}]}], "}"}]}], "]"}], ",",
            " ", 
           RowBox[{"{", " ", 
            RowBox[{"k", ",", " ", "1", ",", " ", 
             RowBox[{"Length", "[", 
              RowBox[{"#", "[", 
               RowBox[{"[", "5", "]"}], "]"}], "]"}]}], "}"}]}], "]"}], ",", 
         RowBox[{"(*", " ", "\[Tau]", " ", "*)"}], "\[IndentingNewLine]", 
         RowBox[{"#", "[", 
          RowBox[{"[", "6", "]"}], "]"}]}], " ", 
        RowBox[{"(*", " ", "clamp", " ", "*)"}], "\[IndentingNewLine]", 
        "]"}]}], " ", "}"}], "&"}], " ", "/@", " ", 
    RowBox[{"Table", "[", 
     RowBox[{
      RowBox[{"{", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"Random", "[", "]"}], ",", " ", 
          RowBox[{"{", 
           RowBox[{"i", ",", " ", "1", ",", " ", "nlabels"}], "}"}]}], "]"}], 
        ",", " ", 
        RowBox[{"(*", " ", "priorz", " ", "*)"}], "\[IndentingNewLine]", 
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{
            RowBox[{"Random", "[", 
             RowBox[{"Integer", ",", " ", 
              RowBox[{"nworkers", " ", "-", " ", "1"}]}], "]"}], ",", 
            RowBox[{"Random", "[", 
             RowBox[{"Integer", ",", " ", 
              RowBox[{"nlabels", " ", "-", " ", "1"}]}], "]"}]}], "}"}], ",", 
          " ", 
          RowBox[{"{", " ", 
           RowBox[{"i", ",", " ", "1", ",", " ", "nratings"}], " ", "}"}]}], 
         "]"}], ",", 
        RowBox[{"(*", " ", "d", " ", "*)"}], "\[IndentingNewLine]", 
        RowBox[{"Random", "[", "]"}], ",", " ", 
        RowBox[{"(*", " ", "log\[Alpha]", " ", "*)"}], "\[IndentingNewLine]", 
        
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"Random", "[", "]"}], ",", " ", 
          RowBox[{"{", " ", 
           RowBox[{"i", ",", " ", "1", ",", " ", "nworkers"}], " ", "}"}]}], 
         "]"}], ",", " ", 
        RowBox[{"(*", " ", "log\[Lambda]", " ", "*)"}], " ", 
        "\[IndentingNewLine]", 
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"Table", "[", 
           RowBox[{
            RowBox[{"0.2", " ", 
             RowBox[{"Random", "[", "]"}]}], ",", 
            RowBox[{"{", " ", 
             RowBox[{"j", ",", " ", "1", ",", " ", 
              RowBox[{"nlabels", " ", "-", " ", "1"}]}], "}"}]}], "]"}], ",", 
          " ", 
          RowBox[{"{", " ", 
           RowBox[{"k", ",", " ", "1", ",", " ", "nworkers"}], "}"}]}], "]"}],
         ",", " ", 
        RowBox[{"(*", " ", "\[Tau]", " ", "*)"}], "\[IndentingNewLine]", 
        RowBox[{"If", "[", 
         RowBox[{
          RowBox[{
           RowBox[{"Random", "[", "]"}], " ", "<", " ", "0.5"}], ",", " ", 
          RowBox[{"-", "1"}], ",", " ", 
          RowBox[{"Random", "[", 
           RowBox[{"Integer", ",", " ", 
            RowBox[{"nlabels", " ", "-", " ", "1"}]}], "]"}]}], "]"}]}], " ", 
       
       RowBox[{"(*", " ", "clamp", " ", "*)"}], "\[IndentingNewLine]", "}"}], 
      ",", " ", 
      RowBox[{"{", " ", 
       RowBox[{"foo", ",", " ", "1", ",", " ", "10"}], " ", "}"}]}], "]"}]}], 
   ")"}]}]}], "Input",
 CellChangeTimes->{{3.504016424813343*^9, 3.504016580297758*^9}, {
   3.504018269599441*^9, 3.504018279219314*^9}, {3.504018359153508*^9, 
   3.504018387475568*^9}, {3.5040184327040863`*^9, 3.504018509500141*^9}, {
   3.504018861653284*^9, 3.504018920277594*^9}, {3.504019049785894*^9, 
   3.504019065803638*^9}, 3.504019184180941*^9, {3.504059801963703*^9, 
   3.504059813764331*^9}, 3.5040599982883453`*^9, {3.504060100407703*^9, 
   3.504060104803857*^9}, 3.504060440796597*^9, {3.504060503267675*^9, 
   3.504060525182757*^9}, {3.50418590618461*^9, 3.504185912579707*^9}, {
   3.504186397115213*^9, 3.5041864627493553`*^9}, {3.504187243434793*^9, 
   3.504187335384948*^9}, {3.5041877893781147`*^9, 3.504187789468603*^9}, {
   3.5042036666855288`*^9, 3.504203720287292*^9}, {3.504203761143361*^9, 
   3.5042038785987473`*^9}, 3.504204172101022*^9, {3.504204669966267*^9, 
   3.504204721532045*^9}, {3.504205201368525*^9, 3.50420520145702*^9}, {
   3.505589135463067*^9, 3.505589138197913*^9}, {3.505589410144479*^9, 
   3.505589470226988*^9}, {3.50558950031635*^9, 3.5055895318620234`*^9}, {
   3.505593036660348*^9, 3.5055930431613007`*^9}, 3.505593571277896*^9, {
   3.5055946005056257`*^9, 3.505594637819249*^9}, {3.505594708646364*^9, 
   3.5055947672213717`*^9}, 3.505594822362433*^9, 3.505694904993847*^9, 
   3.50569495400416*^9, {3.5057484466063337`*^9, 3.505748464550887*^9}, 
   3.505759963261848*^9, {3.50594173038643*^9, 3.505941756411881*^9}, 
   3.5059418679837847`*^9, {3.525989118603919*^9, 3.525989133588447*^9}, {
   3.525989176585618*^9, 3.525989329780985*^9}, {3.5259894579149*^9, 
   3.525989471950355*^9}, {3.525989581415557*^9, 3.525989585593624*^9}, {
   3.525992245973118*^9, 3.52599228203554*^9}, 3.5259939716950493`*^9, {
   3.527036152680112*^9, 3.5270361807314568`*^9}, {3.527036265698546*^9, 
   3.527036266168323*^9}, 3.527036368077401*^9, {3.5270365457436237`*^9, 
   3.527036593361165*^9}, 3.5270366239028397`*^9, {3.527036753682835*^9, 
   3.5270367542957773`*^9}, {3.527036835740769*^9, 3.527036841375969*^9}, {
   3.527037955967847*^9, 3.527037979360462*^9}, {3.527038099170415*^9, 
   3.5270380994422493`*^9}, 3.527038608909306*^9, 3.5270386414534082`*^9, {
   3.527108464277216*^9, 3.527108490811516*^9}, 3.5271116049990063`*^9, 
   3.527112018620144*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
        "0.7914704754796086`", ",", "0.21678857335427704`", ",", 
         "0.41594754619326185`", ",", "0.029444614813880034`", ",", 
         "0.4540817252474968`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"2", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "3"}], "}"}]}], "}"}], ",", "0.5588527475049717`",
        ",", 
       RowBox[{"{", 
        RowBox[{
        "0.08056045265562105`", ",", "0.1925370281503511`", ",", 
         "0.9595835564518136`", ",", "0.304599850075122`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.15593823872199192`", ",", "0.17681884544149018`", ",", 
         "0.06716949469892697`", ",", "0.1833724484346693`", ",", 
         "0.1331027700813101`", ",", "0.15587569518690755`", ",", 
         "0.05327861007257222`", ",", "0.04664806002632357`", ",", 
         "0.06171257779847126`", ",", "0.13543078518600923`", ",", 
         "0.12217645066958101`", ",", "0.0247330592124713`", ",", 
         "0.14040232333226643`", ",", "0.08420568802621996`", ",", 
         "0.1638823555736593`", ",", "0.18137534454161588`"}], "}"}], ",", 
       RowBox[{"-", "1"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
      "2.12564033784469`*^-15", ",", "0.0001079265459677428`", ",", 
       "0.999825600303269`", ",", "0.00006647315076097895`", ",", 
       "1.4395660447071986`*^-16"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
        "0.3915838253172197`", ",", "0.36533005262079965`", ",", 
         "0.34802397520310774`", ",", "0.20550361781244922`", ",", 
         "0.1990467971668686`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"2", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "0"}], "}"}]}], "}"}], ",", "0.405746496168986`", 
       ",", 
       RowBox[{"{", 
        RowBox[{
        "0.04342412512798567`", ",", "0.42581242420248966`", ",", 
         "0.31495256995941767`", ",", "0.06989902267435119`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.02531237659092785`", ",", "0.15205971475918784`", ",", 
         "0.107114818804976`", ",", "0.16070119446229802`", ",", 
         "0.1786643165646043`", ",", "0.09034713696071657`", ",", 
         "0.17168403361896678`", ",", "0.038524743792717`", ",", 
         "0.15393125735213298`", ",", "0.14994481362845014`", ",", 
         "0.08747834559274681`", ",", "0.07464238821905772`", ",", 
         "0.1725559128105171`", ",", "0.09273199953483609`", ",", 
         "0.009161580529302863`", ",", "0.0015763776948977946`"}], "}"}], ",",
        "1"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
      "1.1693381873537711`*^-20", ",", "0.00093871430712029`", ",", 
       "0.018632842184581454`", ",", "0.9793973565962496`", ",", 
       "0.0010310869120485984`"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
        "0.25815637986173123`", ",", "0.8467611054796457`", ",", 
         "0.602135392305503`", ",", "0.4713314637214921`", ",", 
         "0.8323439556592416`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "1"}], "}"}]}], "}"}], ",", "0.531808535520228`", 
       ",", 
       RowBox[{"{", 
        RowBox[{
        "0.5322363696311517`", ",", "0.3447695807668528`", ",", 
         "0.07204538186330248`", ",", "0.9962344414953481`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.14574607946393234`", ",", "0.0902895995887663`", ",", 
         "0.12406193941194393`", ",", "0.027562854680102875`", ",", 
         "0.10722133567121535`", ",", "0.13635834223663332`", ",", 
         "0.1741171257834938`", ",", "0.1400845090873561`", ",", 
         "0.032578947452157614`", ",", "0.16380242942611623`", ",", 
         "0.08138512624865771`", ",", "0.1309229285580532`", ",", 
         "0.031002569757259825`", ",", "0.060851311656220666`", ",", 
         "0.029753850276311458`", ",", "0.1615707074621241`"}], "}"}], ",", 
       "4"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
      "1.5142088506956124`*^-38", ",", "2.1614500666254583`*^-20", ",", 
       "1.0391887927325933`*^-8", ",", "0.0003703715474874956`", ",", 
       "0.9996296180606247`"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
        "0.8329250945596113`", ",", "0.3164252957223157`", ",", 
         "0.27604500179039226`", ",", "0.020641086849644365`", ",", 
         "0.4881555137927584`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}]}], "}"}], ",", "0.2443799138590132`",
        ",", 
       RowBox[{"{", 
        RowBox[{
        "0.2798105602950442`", ",", "0.29191068952998267`", ",", 
         "0.03670751584892695`", ",", "0.6240702167992935`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.028399257378905963`", ",", "0.1511608022347812`", ",", 
         "0.07098316093315209`", ",", "0.15069691757636494`", ",", 
         "0.0883147482915499`", ",", "0.11858185478262358`", ",", 
         "0.10718073150703587`", ",", "0.06931179132770722`", ",", 
         "0.1573918197334967`", ",", "0.08757928502536377`", ",", 
         "0.0463294198508152`", ",", "0.03955794105139577`", ",", 
         "0.19582111227137264`", ",", "0.17700379372920455`", ",", 
         "0.07974440093889296`", ",", "0.17627288190693263`"}], "}"}], ",", 
       "0"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
      "9.257597437849093`*^-8", ",", "0.00005912367522926543`", ",", 
       "0.8840113850131672`", ",", "0.11592892809291994`", ",", 
       "4.7064270923712366`*^-7"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
        "0.8643778817963783`", ",", "0.9105664909017063`", ",", 
         "0.63698449567565`", ",", "0.42324999927142665`", ",", 
         "0.5724671922663956`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"1", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "4"}], "}"}]}], "}"}], ",", "0.8738589750527794`",
        ",", 
       RowBox[{"{", 
        RowBox[{
        "0.0129142788763564`", ",", "0.2812537123768968`", ",", 
         "0.8166631810924896`", ",", "0.518943170387019`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.051885938198906356`", ",", "0.16793599418382948`", ",", 
         "0.044750781435874354`", ",", "0.19660790257036795`", ",", 
         "0.18257414687119913`", ",", "0.010544174450332781`", ",", 
         "0.1571714964105106`", ",", "0.15027848271955274`", ",", 
         "0.14301620581980337`", ",", "0.014723062178960161`", ",", 
         "0.18016770268130608`", ",", "0.07053408178065979`", ",", 
         "0.16674332391287075`", ",", "0.074110950265666`", ",", 
         "0.007292126322030398`", ",", "0.08842078360031852`"}], "}"}], ",", 
       RowBox[{"-", "1"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
      "8.601976236704521`*^-32", ",", "3.01741877197762`*^-12", ",", 
       "0.06555101337114422`", ",", "0.9344489122392435`", ",", 
       "7.438659483751595`*^-8"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
        "0.9473047520569033`", ",", "0.46399343934375636`", ",", 
         "0.5682449429488132`", ",", "0.18381784501234733`", ",", 
         "0.6660510396800066`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"3", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "1"}], "}"}]}], "}"}], ",", "0.6473302582512668`",
        ",", 
       RowBox[{"{", 
        RowBox[{
        "0.049301772561794265`", ",", "0.9243881540178155`", ",", 
         "0.8263710687608592`", ",", "0.423576351071895`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.013252451941990921`", ",", "0.0023034839323639706`", ",", 
         "0.15473003930183907`", ",", "0.12754377380386842`", ",", 
         "0.06297396922243818`", ",", "0.059287278112560605`", ",", 
         "0.1400069771228789`", ",", "0.14737607112256235`", ",", 
         "0.19243988744177842`", ",", "0.09254395419968987`", ",", 
         "0.06589602685721291`", ",", "0.14008394480053196`", ",", 
         "0.10401910384145988`", ",", "0.053197529421949136`", ",", 
         "0.07643507644583224`", ",", "0.047285256931780685`"}], "}"}], ",", 
       "3"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
      "1.223294920134899`*^-6", ",", "0.9971403430331616`", ",", 
       "0.002858423004180391`", ",", "1.0667737796152949`*^-8", ",", 
       "7.281874736863997`*^-34"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
        "0.08216980209739833`", ",", "0.7161243425491546`", ",", 
         "0.5890960264076367`", ",", "0.9025488036966919`", ",", 
         "0.1577816480795828`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"3", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "2"}], "}"}]}], "}"}], ",", "0.8897532737882953`",
        ",", 
       RowBox[{"{", 
        RowBox[{
        "0.1655196753357417`", ",", "0.8362865439867373`", ",", 
         "0.14626422841776296`", ",", "0.11610307727909998`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.10556016126327993`", ",", "0.10428333957490928`", ",", 
         "0.16996556757099202`", ",", "0.0832136383329411`", ",", 
         "0.15818409014071758`", ",", "0.11184345213313088`", ",", 
         "0.07742161337130211`", ",", "0.017317611475728186`", ",", 
         "0.01810014534018561`", ",", "0.007824348291670996`", ",", 
         "0.02422408394935299`", ",", "0.14088253502989598`", ",", 
         "0.17081488840840495`", ",", "0.01745423303997377`", ",", 
         "0.007790123529873321`", ",", "0.19765766652006506`"}], "}"}], ",", 
       RowBox[{"-", "1"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
      "4.9048542422964745`*^-21", ",", "1.4842821997076056`*^-6", ",", 
       "0.9968389235586399`", ",", "0.0031595921590954414`", ",", 
       "6.499650230858059`*^-14"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
        "0.18472236150317697`", ",", "0.8811689695697837`", ",", 
         "0.09853505881202987`", ",", "0.09945874029864625`", ",", 
         "0.3484358175164397`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"3", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "2"}], "}"}]}], "}"}], ",", "0.7349047411520209`",
        ",", 
       RowBox[{"{", 
        RowBox[{
        "0.9824319815329299`", ",", "0.5716579339822466`", ",", 
         "0.8270191196418933`", ",", "0.8850769032970609`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.11327275797364489`", ",", "0.15614749665573177`", ",", 
         "0.05356037179524781`", ",", "0.09959376728811008`", ",", 
         "0.09595514649791671`", ",", "0.13804735131554616`", ",", 
         "0.04573602350357681`", ",", "0.07536968333875708`", ",", 
         "0.15507261146802076`", ",", "0.16723246290714122`", ",", 
         "0.028281790463603042`", ",", "0.06757955980888376`", ",", 
         "0.15741494494795572`", ",", "0.11423677978026364`", ",", 
         "0.19133731816296765`", ",", "0.091345765894927`"}], "}"}], ",", 
       "2"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
      "6.350903116342245`*^-42", ",", "4.7757708510869156`*^-18", ",", 
       "0.9999998883080654`", ",", "1.1169193452850034`*^-7", ",", 
       "1.3273902653576598`*^-21"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
        "0.4717251586026719`", ",", "0.6082507732983985`", ",", 
         "0.7218240883226141`", ",", "0.7061076843948189`", ",", 
         "0.9000672246204253`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"1", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "2"}], "}"}]}], "}"}], ",", "0.7812316536565052`",
        ",", 
       RowBox[{"{", 
        RowBox[{
        "0.8367471850255532`", ",", "0.13974389452659436`", ",", 
         "0.11932974134176651`", ",", "0.5134297946802661`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.06775566971700059`", ",", "0.13199363240740217`", ",", 
         "0.08581859695280716`", ",", "0.05694993543247641`", ",", 
         "0.19238598637824353`", ",", "0.17692102093938142`", ",", 
         "0.11858613404566594`", ",", "0.028668144968873373`", ",", 
         "0.12480642656935975`", ",", "0.019506075991425696`", ",", 
         "0.004349354265402312`", ",", "0.03733082680590573`", ",", 
         "0.03346066067443274`", ",", "0.08179814280587595`", ",", 
         "0.11000432254486794`", ",", "0.11568067214622602`"}], "}"}], ",", 
       RowBox[{"-", "1"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
      "7.633499707034996`*^-9", ",", "0.8809944421557674`", ",", 
       "0.11900555020891129`", ",", "1.8213522021299175`*^-12", ",", 
       "6.569030657993062`*^-33"}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
        "0.702883029634561`", ",", "0.6499543881039144`", ",", 
         "0.797171707074625`", ",", "0.6087320300239963`", ",", 
         "0.5631391351079666`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "2"}], "}"}]}], "}"}], ",", "0.5306246467621478`",
        ",", 
       RowBox[{"{", 
        RowBox[{
        "0.2837419123943589`", ",", "0.2699536814389934`", ",", 
         "0.9031709730709558`", ",", "0.10153166199811207`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.19979844704639538`", ",", "0.06160474990955518`", ",", 
         "0.0037131736748097516`", ",", "0.10172019835395647`", ",", 
         "0.171130302077522`", ",", "0.13679832334019545`", ",", 
         "0.18420709768338406`", ",", "0.09737084408855418`", ",", 
         "0.13379947527161629`", ",", "0.1033376626657627`", ",", 
         "0.1024089548775081`", ",", "0.18736652154368624`", ",", 
         "0.018118803125390253`", ",", "0.014241819655852781`", ",", 
         "0.16183234895059592`", ",", "0.057375643922903355`"}], "}"}], ",", 
       RowBox[{"-", "1"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
      "1.4698046171041164`*^-26", ",", "1.106737432082469`*^-11", ",", 
       "0.008370160157610168`", ",", "0.9915588453586577`", ",", 
       "0.00007099447266455808`"}], "}"}]}], "}"}]}], "}"}]], "Output",
 CellChangeTimes->{{3.5259893340334177`*^9, 3.525989337502638*^9}, {
   3.525989472752367*^9, 3.5259894937597933`*^9}, {3.525989581925304*^9, 
   3.525989628149845*^9}, {3.525989666130809*^9, 3.525989681715674*^9}, {
   3.525992246364429*^9, 3.5259922825877943`*^9}, 3.525993972290413*^9, {
   3.5270361825800858`*^9, 3.527036196532954*^9}, 3.527036267904974*^9, 
   3.527036368425497*^9, {3.5270365945244102`*^9, 3.527036624415978*^9}, 
   3.527036756052731*^9, {3.527036836565331*^9, 3.527036852886896*^9}, {
   3.5270379594924088`*^9, 3.527037979602713*^9}, {3.527038022418974*^9, 
   3.527038026823287*^9}, 3.527038100166356*^9, 3.527038530506792*^9, 
   3.527038609261449*^9, 3.5270386420612087`*^9, {3.527108464838595*^9, 
   3.5271084913170147`*^9}, 3.5271114829966516`*^9, 3.527111605287054*^9, {
   3.527111990113194*^9, 3.527112019087687*^9}}]
}, Open  ]]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["Qfunc", "Subsection",
 CellChangeTimes->{{3.525095319326301*^9, 3.525095320059371*^9}, {
   3.526411808061521*^9, 3.526411811200098*^9}, 3.526492345471158*^9}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"Clear", "[", "qfunc", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"qfunc", "[", 
    RowBox[{
    "\[Kappa]_", ",", " ", "log\[Alpha]_", ",", " ", "\[Tau]_", ",", " ", 
     "log\[Lambda]_", ",", " ", "pz_", ",", "d_", ",", " ", "plog\[Alpha]_"}],
     "]"}], " ", ":=", " ", 
   RowBox[{"Module", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"q", " ", "=", " ", "0"}], ",", " ", "x", ",", " ", "y", ",", 
       " ", "z", ",", " ", "worker", ",", " ", "rating"}], "}"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"For", "[", 
       RowBox[{
        RowBox[{"x", " ", "=", " ", "1"}], ",", " ", 
        RowBox[{"x", " ", "\[LessEqual]", " ", 
         RowBox[{"Length", "[", "pz", "]"}]}], ",", " ", 
        RowBox[{"++", "x"}], ",", "\[IndentingNewLine]", 
        RowBox[{"q", " ", "-=", " ", 
         RowBox[{
          RowBox[{"pz", "[", 
           RowBox[{"[", "x", "]"}], "]"}], " ", 
          RowBox[{"Log", "[", 
           RowBox[{"pz", "[", 
            RowBox[{"[", "x", "]"}], "]"}], "]"}]}]}]}], 
       "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", 
      RowBox[{"For", "[", 
       RowBox[{
        RowBox[{"x", " ", "=", " ", "1"}], ",", " ", 
        RowBox[{"x", " ", "\[LessEqual]", " ", 
         RowBox[{"Length", "[", "d", "]"}]}], ",", " ", 
        RowBox[{"++", "x"}], ",", "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{"worker", " ", "=", " ", 
          RowBox[{
           RowBox[{"d", "[", 
            RowBox[{"[", "x", "]"}], "]"}], "[", 
           RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", 
         RowBox[{"rating", " ", "=", " ", 
          RowBox[{
           RowBox[{"d", "[", 
            RowBox[{"[", "x", "]"}], "]"}], "[", 
           RowBox[{"[", "2", "]"}], "]"}]}], ";", "\[IndentingNewLine]", 
         RowBox[{"For", "[", 
          RowBox[{
           RowBox[{"y", " ", "=", " ", "1"}], ",", " ", 
           RowBox[{"y", " ", "\[LessEqual]", " ", 
            RowBox[{"Length", "[", "pz", "]"}]}], ",", " ", 
           RowBox[{"++", "y"}], ",", "\[IndentingNewLine]", 
           RowBox[{"q", " ", "+=", " ", 
            RowBox[{
             RowBox[{"pz", "[", 
              RowBox[{"[", "y", "]"}], "]"}], 
             RowBox[{"Log", "[", 
              RowBox[{"polytomousrasch", "[", 
               RowBox[{"rating", ",", 
                RowBox[{"(", 
                 RowBox[{"y", " ", "-", " ", "1"}], ")"}], ",", " ", 
                RowBox[{
                 RowBox[{"Exp", "[", "log\[Alpha]", "]"}], " ", 
                 RowBox[{"Exp", "[", 
                  RowBox[{"log\[Lambda]", "[", 
                   RowBox[{"[", "worker", "]"}], "]"}], "]"}]}], ",", " ", 
                RowBox[{"\[Tau]", "[", 
                 RowBox[{"[", "worker", "]"}], "]"}]}], "]"}], "]"}]}]}]}], 
          "\[IndentingNewLine]", "]"}]}]}], "\[IndentingNewLine]", "]"}], ";",
       "\[IndentingNewLine]", "\[IndentingNewLine]", 
      RowBox[{"q", " ", "+=", " ", 
       RowBox[{"Log", "[", 
        RowBox[{"PDF", "[", 
         RowBox[{
          RowBox[{"plog\[Alpha]", "[", "\[Kappa]", "]"}], ",", " ", 
          "log\[Alpha]"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", 
      "q"}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.505595455899826*^9, 3.5055954815028133`*^9}, {
   3.505595591072061*^9, 3.505595746588525*^9}, {3.505595921361999*^9, 
   3.505595921696361*^9}, {3.505673645537788*^9, 3.505673719447109*^9}, {
   3.505673756166316*^9, 3.505673756674253*^9}, {3.505694245510009*^9, 
   3.505694268051146*^9}, {3.505760009986413*^9, 3.5057600165699587`*^9}, {
   3.50576005721931*^9, 3.505760078610647*^9}, {3.5057625246204443`*^9, 
   3.505762552682109*^9}, {3.5057627938738422`*^9, 3.505762797951902*^9}, {
   3.505765158450721*^9, 3.505765213777804*^9}, {3.5059421283530493`*^9, 
   3.505942210664938*^9}, {3.506003737712338*^9, 3.5060037700735073`*^9}, {
   3.522541916078946*^9, 3.522541921920133*^9}, {3.526411842479517*^9, 
   3.526412026433256*^9}, 3.526412647091461*^9, {3.526413173677617*^9, 
   3.526413177796151*^9}, {3.526413211815695*^9, 3.5264132663530617`*^9}, {
   3.527108547518177*^9, 3.527108550252036*^9}, {3.527112088658349*^9, 
   3.5271120899746304`*^9}}],

Cell[CellGroupData[{

Cell["Test Vectors for Q func", "Subsubsection",
 CellChangeTimes->{{3.50401932583255*^9, 3.504019328703233*^9}, {
  3.504185890254962*^9, 3.504185890709035*^9}, {3.5042036574835863`*^9, 
  3.504203657569166*^9}, {3.504916768505199*^9, 3.504916769023423*^9}, {
  3.5264122361917953`*^9, 3.526412241984367*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"Clear", "[", "nworkers", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"nworkers", " ", "=", " ", "4"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Clear", "[", "nlabels", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"nlabels", " ", "=", " ", "5"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Clear", "[", "nratings", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"nratings", " ", "=", " ", "8"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"{", " ", 
    RowBox[{
     RowBox[{
      RowBox[{
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"ListQ", "[", "#", "]"}], " ", "&&", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"!", " ", 
             RowBox[{"ListQ", "[", 
              RowBox[{"#", "[", 
               RowBox[{"[", "1", "]"}], "]"}], "]"}]}], " ", "||", " ", 
            RowBox[{"!", " ", 
             RowBox[{"IntegerQ", "[", 
              RowBox[{
               RowBox[{"#", "[", 
                RowBox[{"[", "1", "]"}], "]"}], "[", 
               RowBox[{"[", "1", "]"}], "]"}], "]"}]}]}], ")"}]}], ",", " ", 
         RowBox[{"Flatten", "[", "#", "]"}], ",", " ", "#"}], "]"}], "&"}], 
      " ", "/@", " ", "#"}], ",", " ", "\[IndentingNewLine]", 
     RowBox[{"{", " ", 
      RowBox[{
       RowBox[{"qfunc", "[", "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{"#", "[", 
          RowBox[{"[", "1", "]"}], "]"}], ",", " ", 
         RowBox[{"(*", " ", "\[Kappa]", " ", "*)"}], "\[IndentingNewLine]", 
         RowBox[{"#", "[", 
          RowBox[{"[", "2", "]"}], "]"}], ",", " ", 
         RowBox[{"(*", " ", "log\[Alpha]", " ", "*)"}], "\[IndentingNewLine]", 
         RowBox[{"Table", "[", 
          RowBox[{
           RowBox[{"Table", "[", 
            RowBox[{
             RowBox[{"j", "  ", "-", " ", "0.5", " ", "+", " ", 
              RowBox[{
               RowBox[{
                RowBox[{"#", "[", 
                 RowBox[{"[", "3", "]"}], "]"}], "[", 
                RowBox[{"[", "k", "]"}], "]"}], "[", 
               RowBox[{"[", "j", "]"}], "]"}]}], ",", 
             RowBox[{"{", " ", 
              RowBox[{"j", ",", " ", "1", ",", " ", 
               RowBox[{"Length", "[", 
                RowBox[{
                 RowBox[{"#", "[", 
                  RowBox[{"[", "3", "]"}], "]"}], "[", 
                 RowBox[{"[", "k", "]"}], "]"}], "]"}]}], "}"}]}], "]"}], ",",
            " ", 
           RowBox[{"{", " ", 
            RowBox[{"k", ",", " ", "1", ",", " ", 
             RowBox[{"Length", "[", 
              RowBox[{"#", "[", 
               RowBox[{"[", "3", "]"}], "]"}], "]"}]}], "}"}]}], "]"}], ",", 
         RowBox[{"(*", " ", "\[Tau]", " ", "*)"}], "\[IndentingNewLine]", 
         RowBox[{"#", "[", 
          RowBox[{"[", "4", "]"}], "]"}], ",", " ", 
         RowBox[{"(*", " ", "log\[Lambda]", " ", "*)"}], 
         "\[IndentingNewLine]", 
         RowBox[{"#", "[", 
          RowBox[{"[", "5", "]"}], "]"}], ",", " ", 
         RowBox[{"(*", " ", "pz", " ", "*)"}], "\[IndentingNewLine]", 
         RowBox[{"(", 
          RowBox[{
           RowBox[{
            RowBox[{"{", 
             RowBox[{
              RowBox[{"1", "+", 
               RowBox[{"#", "[", 
                RowBox[{"[", "1", "]"}], "]"}]}], ",", 
              RowBox[{"#", "[", 
               RowBox[{"[", "2", "]"}], "]"}]}], "}"}], "&"}], " ", "/@", " ", 
           RowBox[{"#", "[", 
            RowBox[{"[", "6", "]"}], "]"}]}], ")"}], ",", " ", 
         RowBox[{"(*", " ", "d", " ", "*)"}], 
         RowBox[{"Function", "[", 
          RowBox[{"x", ",", " ", 
           RowBox[{"NormalDistribution", "[", 
            RowBox[{"x", ",", " ", 
             RowBox[{"#", "[", 
              RowBox[{"[", "7", "]"}], "]"}]}], "]"}]}], "]"}]}], " ", 
        RowBox[{"(*", " ", "plog\[Alpha]", " ", "*)"}], "\[IndentingNewLine]",
         "]"}], ",", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"D", "[", 
         RowBox[{
          RowBox[{"qfunc", "[", "\[IndentingNewLine]", 
           RowBox[{
            RowBox[{"#", "[", 
             RowBox[{"[", "1", "]"}], "]"}], ",", " ", 
            RowBox[{"(*", " ", "\[Kappa]", " ", "*)"}], "\[IndentingNewLine]",
             "ztmp", ",", " ", 
            RowBox[{"(*", " ", "log\[Alpha]", " ", "*)"}], 
            "\[IndentingNewLine]", 
            RowBox[{"Table", "[", 
             RowBox[{
              RowBox[{"Table", "[", 
               RowBox[{
                RowBox[{"j", "  ", "-", " ", "0.5", " ", "+", " ", 
                 RowBox[{
                  RowBox[{
                   RowBox[{"#", "[", 
                    RowBox[{"[", "3", "]"}], "]"}], "[", 
                   RowBox[{"[", "k", "]"}], "]"}], "[", 
                  RowBox[{"[", "j", "]"}], "]"}]}], ",", 
                RowBox[{"{", " ", 
                 RowBox[{"j", ",", " ", "1", ",", " ", 
                  RowBox[{"Length", "[", 
                   RowBox[{
                    RowBox[{"#", "[", 
                    RowBox[{"[", "3", "]"}], "]"}], "[", 
                    RowBox[{"[", "k", "]"}], "]"}], "]"}]}], "}"}]}], "]"}], 
              ",", " ", 
              RowBox[{"{", " ", 
               RowBox[{"k", ",", " ", "1", ",", " ", 
                RowBox[{"Length", "[", 
                 RowBox[{"#", "[", 
                  RowBox[{"[", "3", "]"}], "]"}], "]"}]}], "}"}]}], "]"}], 
            ",", 
            RowBox[{"(*", " ", "\[Tau]", " ", "*)"}], "\[IndentingNewLine]", 
            RowBox[{"#", "[", 
             RowBox[{"[", "4", "]"}], "]"}], ",", " ", 
            RowBox[{"(*", " ", "log\[Lambda]", " ", "*)"}], 
            "\[IndentingNewLine]", 
            RowBox[{"#", "[", 
             RowBox[{"[", "5", "]"}], "]"}], ",", " ", 
            RowBox[{"(*", " ", "pz", " ", "*)"}], "\[IndentingNewLine]", 
            RowBox[{"(", 
             RowBox[{
              RowBox[{
               RowBox[{"{", 
                RowBox[{
                 RowBox[{"1", "+", 
                  RowBox[{"#", "[", 
                   RowBox[{"[", "1", "]"}], "]"}]}], ",", 
                 RowBox[{"#", "[", 
                  RowBox[{"[", "2", "]"}], "]"}]}], "}"}], "&"}], " ", "/@", 
              " ", 
              RowBox[{"#", "[", 
               RowBox[{"[", "6", "]"}], "]"}]}], ")"}], ",", " ", 
            RowBox[{"(*", " ", "d", " ", "*)"}], 
            RowBox[{"Function", "[", 
             RowBox[{"x", ",", " ", 
              RowBox[{"NormalDistribution", "[", 
               RowBox[{"x", ",", " ", 
                RowBox[{"#", "[", 
                 RowBox[{"[", "7", "]"}], "]"}]}], "]"}]}], "]"}]}], " ", 
           RowBox[{"(*", " ", "plog\[Alpha]", " ", "*)"}], 
           "\[IndentingNewLine]", "]"}], ",", " ", "ztmp"}], "]"}], " ", "/.",
         " ", 
        RowBox[{"ztmp", " ", "\[Rule]", " ", 
         RowBox[{"#", "[", 
          RowBox[{"[", "2", "]"}], "]"}]}]}], ",", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"D", "[", 
         RowBox[{
          RowBox[{"qfunc", "[", "\[IndentingNewLine]", 
           RowBox[{
            RowBox[{"#", "[", 
             RowBox[{"[", "1", "]"}], "]"}], ",", " ", 
            RowBox[{"(*", " ", "\[Kappa]", " ", "*)"}], "\[IndentingNewLine]",
             "ztmp", ",", " ", 
            RowBox[{"(*", " ", "log\[Alpha]", " ", "*)"}], 
            "\[IndentingNewLine]", 
            RowBox[{"Table", "[", 
             RowBox[{
              RowBox[{"Table", "[", 
               RowBox[{
                RowBox[{"j", "  ", "-", " ", "0.5", " ", "+", " ", 
                 RowBox[{
                  RowBox[{
                   RowBox[{"#", "[", 
                    RowBox[{"[", "3", "]"}], "]"}], "[", 
                   RowBox[{"[", "k", "]"}], "]"}], "[", 
                  RowBox[{"[", "j", "]"}], "]"}]}], ",", 
                RowBox[{"{", " ", 
                 RowBox[{"j", ",", " ", "1", ",", " ", 
                  RowBox[{"Length", "[", 
                   RowBox[{
                    RowBox[{"#", "[", 
                    RowBox[{"[", "3", "]"}], "]"}], "[", 
                    RowBox[{"[", "k", "]"}], "]"}], "]"}]}], "}"}]}], "]"}], 
              ",", " ", 
              RowBox[{"{", " ", 
               RowBox[{"k", ",", " ", "1", ",", " ", 
                RowBox[{"Length", "[", 
                 RowBox[{"#", "[", 
                  RowBox[{"[", "3", "]"}], "]"}], "]"}]}], "}"}]}], "]"}], 
            ",", 
            RowBox[{"(*", " ", "\[Tau]", " ", "*)"}], "\[IndentingNewLine]", 
            RowBox[{"#", "[", 
             RowBox[{"[", "4", "]"}], "]"}], ",", " ", 
            RowBox[{"(*", " ", "log\[Lambda]", " ", "*)"}], 
            "\[IndentingNewLine]", 
            RowBox[{"#", "[", 
             RowBox[{"[", "5", "]"}], "]"}], ",", " ", 
            RowBox[{"(*", " ", "pz", " ", "*)"}], "\[IndentingNewLine]", 
            RowBox[{"(", 
             RowBox[{
              RowBox[{
               RowBox[{"{", 
                RowBox[{
                 RowBox[{"1", "+", 
                  RowBox[{"#", "[", 
                   RowBox[{"[", "1", "]"}], "]"}]}], ",", 
                 RowBox[{"#", "[", 
                  RowBox[{"[", "2", "]"}], "]"}]}], "}"}], "&"}], " ", "/@", 
              " ", 
              RowBox[{"#", "[", 
               RowBox[{"[", "6", "]"}], "]"}]}], ")"}], ",", " ", 
            RowBox[{"(*", " ", "d", " ", "*)"}], 
            RowBox[{"Function", "[", 
             RowBox[{"x", ",", " ", 
              RowBox[{"NormalDistribution", "[", 
               RowBox[{"x", ",", " ", 
                RowBox[{"#", "[", 
                 RowBox[{"[", "7", "]"}], "]"}]}], "]"}]}], "]"}]}], " ", 
           RowBox[{"(*", " ", "plog\[Alpha]", " ", "*)"}], 
           "\[IndentingNewLine]", "]"}], ",", " ", 
          RowBox[{"{", " ", 
           RowBox[{"ztmp", ",", " ", "2"}], " ", "}"}]}], "]"}], " ", "/.", 
        " ", 
        RowBox[{"ztmp", " ", "\[Rule]", " ", 
         RowBox[{"#", "[", 
          RowBox[{"[", "2", "]"}], "]"}]}]}]}], "\[IndentingNewLine]", 
      "}"}]}], "\[IndentingNewLine]", "}"}], "&"}], "/@", 
  "\[IndentingNewLine]", 
  RowBox[{"Table", "[", 
   RowBox[{
    RowBox[{"{", " ", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"Random", "[", "]"}], ",", " ", 
      RowBox[{"(*", " ", "\[Kappa]", " ", "*)"}], "\[IndentingNewLine]", 
      RowBox[{"Random", "[", "]"}], ",", " ", 
      RowBox[{"(*", " ", "log\[Alpha]", " ", "*)"}], "\[IndentingNewLine]", 
      RowBox[{"Table", "[", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"Random", "[", "]"}], ",", " ", 
          RowBox[{"{", " ", 
           RowBox[{"i", ",", " ", "1", ",", " ", 
            RowBox[{"nlabels", " ", "-", " ", "1"}]}], "}"}]}], "]"}], ",", 
        " ", 
        RowBox[{"{", " ", 
         RowBox[{"k", ",", " ", "1", ",", " ", "nworkers"}], "}"}]}], "]"}], 
      ",", " ", 
      RowBox[{"(*", " ", "\[Tau]", " ", "*)"}], "\[IndentingNewLine]", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{"Random", "[", "]"}], ",", " ", 
        RowBox[{"{", " ", 
         RowBox[{"i", ",", " ", "1", ",", " ", "nworkers"}], " ", "}"}]}], 
       "]"}], ",", " ", 
      RowBox[{"(*", " ", "log\[Lambda]", " ", "*)"}], "\[IndentingNewLine]", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{"Random", "[", "]"}], ",", " ", 
        RowBox[{"{", " ", 
         RowBox[{"i", ",", " ", "1", ",", " ", "nlabels"}], " ", "}"}]}], 
       "]"}], ",", " ", 
      RowBox[{"(*", " ", "pz", " ", "*)"}], "\[IndentingNewLine]", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{"{", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"Random", "[", 
           RowBox[{"Integer", ",", " ", 
            RowBox[{"nworkers", " ", "-", " ", "1"}]}], "]"}], ",", 
          "\[IndentingNewLine]", 
          RowBox[{"Random", "[", 
           RowBox[{"Integer", ",", " ", 
            RowBox[{"nlabels", " ", "-", " ", "1"}]}], "]"}]}], 
         "\[IndentingNewLine]", "}"}], ",", " ", 
        RowBox[{"{", " ", 
         RowBox[{"i", ",", " ", "1", ",", " ", "nratings"}], " ", "}"}]}], 
       "]"}], ",", " ", 
      RowBox[{"(*", " ", "d", " ", "*)"}], "\[IndentingNewLine]", 
      RowBox[{"Random", "[", "]"}]}], " ", 
     RowBox[{"(*", " ", 
      RowBox[{"plog\[Alpha]", " ", "stddev"}], " ", "*)"}], 
     "\[IndentingNewLine]", "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{"{", " ", 
     RowBox[{"foo", ",", " ", "1", ",", " ", "10"}], " ", "}"}]}], 
   "]"}]}]}], "Input",
 CellChangeTimes->{{3.504016424813343*^9, 3.504016580297758*^9}, {
   3.504018269599441*^9, 3.504018279219314*^9}, {3.504018359153508*^9, 
   3.504018387475568*^9}, {3.5040184327040863`*^9, 3.504018509500141*^9}, {
   3.504018861653284*^9, 3.504018920277594*^9}, {3.504019049785894*^9, 
   3.504019065803638*^9}, 3.504019184180941*^9, {3.504059801963703*^9, 
   3.504059813764331*^9}, 3.5040599982883453`*^9, {3.504060100407703*^9, 
   3.504060104803857*^9}, 3.504060440796597*^9, {3.504060503267675*^9, 
   3.504060525182757*^9}, {3.50456047953319*^9, 3.504560681387557*^9}, {
   3.504577463729417*^9, 3.504577464011519*^9}, {3.504577589051256*^9, 
   3.504577590132493*^9}, {3.504577632742776*^9, 3.5045776330605373`*^9}, {
   3.504740502012248*^9, 3.504740503922497*^9}, {3.504740727150861*^9, 
   3.504740736352736*^9}, 3.504876469621917*^9, {3.5055962008030443`*^9, 
   3.505596275077857*^9}, {3.505596319880871*^9, 3.505596373226162*^9}, {
   3.505596415459552*^9, 3.505596505766666*^9}, {3.50559654044011*^9, 
   3.505596540734797*^9}, 3.505672802683957*^9, 3.5056942774993753`*^9, {
   3.505694366620678*^9, 3.505694366726482*^9}, {3.5057600362594757`*^9, 
   3.5057600462592773`*^9}, 3.505760218072028*^9, {3.5057618784831467`*^9, 
   3.5057618855096197`*^9}, {3.505765314690784*^9, 3.505765460997046*^9}, {
   3.505765519815023*^9, 3.505765560295491*^9}, 3.505765708877458*^9, {
   3.5059422297177*^9, 3.50594224933794*^9}, {3.5059422915411587`*^9, 
   3.5059423868650618`*^9}, {3.505942419849204*^9, 3.505942458271961*^9}, 
   3.506003797955632*^9, 3.522544655482306*^9, 3.522544695510792*^9, {
   3.526412258232821*^9, 3.5264124297647047`*^9}, {3.526412534152213*^9, 
   3.526412549418888*^9}, {3.526412580963234*^9, 3.526412612442492*^9}, {
   3.52641284537436*^9, 3.526412862526091*^9}, {3.526412977275703*^9, 
   3.526412977409284*^9}, {3.5264130300128517`*^9, 3.526413071567891*^9}, {
   3.5264131895823917`*^9, 3.5264131965298567`*^9}, {3.5264133128542147`*^9, 
   3.526413315530311*^9}, {3.526413392188962*^9, 3.5264134345921392`*^9}, {
   3.526413727365831*^9, 3.526413730697576*^9}, {3.52641407631104*^9, 
   3.526414085568967*^9}, 3.526430667444561*^9, 3.52643074409554*^9, {
   3.5270387488016453`*^9, 3.527038761768602*^9}, 3.527038800037517*^9, 
   3.527108561256138*^9, 3.527108736444745*^9, {3.527112179601242*^9, 
   3.527112204986144*^9}, {3.527125280784423*^9, 3.527125296227694*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.9838857348740779`", ",", "0.46412339730875785`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.06873203469165795`", ",", "0.5166372458208504`", ",", 
         "0.9584550365814681`", ",", "0.9267658398788455`", ",", 
         "0.18664403980226815`", ",", "0.8538529563331727`", ",", 
         "0.9793387462265576`", ",", "0.3416471951643455`", ",", 
         "0.53551505988062`", ",", "0.4756233659044714`", ",", 
         "0.9053114153049557`", ",", "0.10015962412024329`", ",", 
         "0.4604510212159795`", ",", "0.044359169254803384`", ",", 
         "0.7573651664511627`", ",", "0.3034733317059037`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.4288949488530153`", ",", "0.664885287597491`", ",", 
         "0.2102001506548799`", ",", "0.9878020378624409`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.4815820772634665`", ",", "0.15495632517698715`", ",", 
         "0.22631441578080194`", ",", "0.5236786405536831`", ",", 
         "0.4128500425718086`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"3", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "0"}], "}"}]}], "}"}], ",", 
       "0.6383190793561367`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "96.19040589580368`"}], ",", 
       RowBox[{"-", "86.18870949452736`"}], ",", 
       RowBox[{"-", "95.9790704127052`"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.26785937919933384`", ",", "0.5969128006748375`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.22620600276954042`", ",", "0.784466123022964`", ",", 
         "0.28852063297277625`", ",", "0.25526560551049204`", ",", 
         "0.6906909428889204`", ",", "0.30884275711849263`", ",", 
         "0.38320921766782057`", ",", "0.15510598139024873`", ",", 
         "0.23023992167294097`", ",", "0.26448358786368925`", ",", 
         "0.6258440512166579`", ",", "0.851632649684345`", ",", 
         "0.8013449728199257`", ",", "0.5995983002661982`", ",", 
         "0.41564390056177797`", ",", "0.8638306118219041`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.3197628955564591`", ",", "0.44464197508921105`", ",", 
         "0.18932948478097603`", ",", "0.34015197126822105`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.9069128529846505`", ",", "0.8063228957330743`", ",", 
         "0.9214701055816422`", ",", "0.7432391705933835`", ",", 
         "0.6807068502151101`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"3", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "2"}], "}"}]}], "}"}], ",", 
       "0.021856772710110217`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "258.2317161570743`"}], ",", 
       RowBox[{"-", "813.3376298471685`"}], ",", 
       RowBox[{"-", "2231.306726730347`"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.6329494726088659`", ",", "0.48797356508289147`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.9900159073261897`", ",", "0.7130140155916176`", ",", 
         "0.2497402549410454`", ",", "0.33286758369264274`", ",", 
         "0.7597759856532488`", ",", "0.44853042772792834`", ",", 
         "0.6238962037243876`", ",", "0.4812349340082977`", ",", 
         "0.9584310128333231`", ",", "0.8489321274617302`", ",", 
         "0.20825230316260956`", ",", "0.6174043221863936`", ",", 
         "0.638668117276864`", ",", "0.4042901523725191`", ",", 
         "0.018922818381633556`", ",", "0.2772523509181725`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.7317552642922134`", ",", "0.5979672566394448`", ",", 
         "0.09745271279999138`", ",", "0.5340131803247891`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.05104841407710328`", ",", "0.5761104839293346`", ",", 
         "0.46450324019112543`", ",", "0.046039615241897536`", ",", 
         "0.0610325067509136`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "1"}], "}"}]}], "}"}], ",", 
       "0.863096468337717`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "45.095245872962415`"}], ",", 
       RowBox[{"-", "37.703240866506015`"}], ",", 
       RowBox[{"-", "43.00541249490498`"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.21476298525008003`", ",", "0.7131720315492548`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.3012565210976649`", ",", "0.4145660406097887`", ",", 
         "0.5908667815256925`", ",", "0.23193709754095707`", ",", 
         "0.34282550826434177`", ",", "0.5656339131480586`", ",", 
         "0.38261447836308293`", ",", "0.6145327753545635`", ",", 
         "0.7041573909874779`", ",", "0.16134376077553944`", ",", 
         "0.36369165998144937`", ",", "0.33728042443639095`", ",", 
         "0.9724021266952644`", ",", "0.5633765041360946`", ",", 
         "0.266238947181458`", ",", "0.8032672441116019`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.9213537126181611`", ",", "0.98726602020676`", ",", 
         "0.8017357069903326`", ",", "0.7572276288697044`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.8603212058672476`", ",", "0.12416955186904298`", ",", 
         "0.5869727217402525`", ",", "0.044055597320449585`", ",", 
         "0.5590646847695827`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"3", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "0"}], "}"}]}], "}"}], ",", 
       "0.7096035112592542`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "190.21469407731462`"}], ",", 
       RowBox[{"-", "184.415932412409`"}], ",", 
       RowBox[{"-", "189.59677978440888`"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.99610594021456`", ",", "0.8121184997794925`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.21623917650524088`", ",", "0.14396959811119575`", ",", 
         "0.6134914618514771`", ",", "0.19758572442492905`", ",", 
         "0.5120817855177631`", ",", "0.9826258373356563`", ",", 
         "0.24979980187002773`", ",", "0.8603052999885381`", ",", 
         "0.5396796588224986`", ",", "0.41924933319956165`", ",", 
         "0.9835608546885697`", ",", "0.0570380558769362`", ",", 
         "0.6183259462043375`", ",", "0.4319833129928017`", ",", 
         "0.18182514769823718`", ",", "0.2998104270072318`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.7580047403370899`", ",", "0.3078137611237587`", ",", 
         "0.5948524259579846`", ",", "0.25575482968678226`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.19894005556750724`", ",", "0.5982102498645044`", ",", 
         "0.5987464857434246`", ",", "0.44363632990728974`", ",", 
         "0.9827008790622663`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}]}], "}"}], ",", 
       "0.4542406517533087`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "177.5562920842777`"}], ",", 
       RowBox[{"-", "163.1684938973138`"}], ",", 
       RowBox[{"-", "178.3222281774528`"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.9852550238919475`", ",", "0.24605060548236068`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.4706190935445033`", ",", "0.4716148144176524`", ",", 
         "0.7354552220219198`", ",", "0.3857453054938226`", ",", 
         "0.9309394347220047`", ",", "0.05236548121809071`", ",", 
         "0.75189436733335`", ",", "0.32870724961688635`", ",", 
         "0.3126134885176673`", ",", "0.620382168225289`", ",", 
         "0.5700692196351129`", ",", "0.028896822609654534`", ",", 
         "0.5546087481805774`", ",", "0.31256840710153033`", ",", 
         "0.9752167936771282`", ",", "0.7731419929228723`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.3556686926130701`", ",", "0.7143581572370259`", ",", 
         "0.3764703079337036`", ",", "0.32950566301558254`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.3729678135508038`", ",", "0.26011750548371726`", ",", 
         "0.3912152840417561`", ",", "0.08345505753322188`", ",", 
         "0.9023487200063004`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}]}], "}"}], ",", 
       "0.7885026910660649`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "82.71674035502477`"}], ",", 
       RowBox[{"-", "69.02791957616786`"}], ",", 
       RowBox[{"-", "78.07888930364342`"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.6557600620198363`", ",", "0.6977097520393993`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.9714092852842957`", ",", "0.7361372098479741`", ",", 
         "0.9038656946864863`", ",", "0.369002502422513`", ",", 
         "0.6587957967666284`", ",", "0.11575504162268513`", ",", 
         "0.33379647505137333`", ",", "0.34010567981285844`", ",", 
         "0.10418704858605102`", ",", "0.8031866345211548`", ",", 
         "0.35857968137424506`", ",", "0.5669636868899861`", ",", 
         "0.7485183559729809`", ",", "0.08882847728412886`", ",", 
         "0.9821093734405415`", ",", "0.23745802387440357`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.37555054242217717`", ",", "0.8287109718004116`", ",", 
         "0.5908940893987854`", ",", "0.15400296634118169`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.47320182241587677`", ",", "0.040208280734346735`", ",", 
         "0.9351340273789491`", ",", "0.4562932143017824`", ",", 
         "0.5017925371315811`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "0"}], "}"}]}], "}"}], ",", 
       "0.3040710708863726`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "154.3374817450018`"}], ",", 
       RowBox[{"-", "143.5297865645342`"}], ",", 
       RowBox[{"-", "162.31170922828557`"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.03126833269246285`", ",", "0.0872907118792694`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.8429967403649526`", ",", "0.18831602926368743`", ",", 
         "0.6974718576410895`", ",", "0.747185032066411`", ",", 
         "0.7388096917789017`", ",", "0.38512939474253266`", ",", 
         "0.3388921762668444`", ",", "0.18022134517642482`", ",", 
         "0.9902913358059208`", ",", "0.2963009174584038`", ",", 
         "0.356782802826303`", ",", "0.9427633213020212`", ",", 
         "0.6147407933837437`", ",", "0.46758994565799217`", ",", 
         "0.7658887134275176`", ",", "0.7887603549608396`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.14153897096786688`", ",", "0.42738166492364543`", ",", 
         "0.8307546860485685`", ",", "0.33246714065905725`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.6397464338362858`", ",", "0.12331059403727287`", ",", 
         "0.7994863533561056`", ",", "0.24517642877978782`", ",", 
         "0.7967496934713331`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "3"}], "}"}]}], "}"}], ",", 
       "0.9349945647735854`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "81.18018452134878`"}], ",", 
       RowBox[{"-", "62.236793399344634`"}], ",", 
       RowBox[{"-", "71.82353569041335`"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.10201449571501615`", ",", "0.49799139671337683`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.05794000169243143`", ",", "0.5498651700310528`", ",", 
         "0.7631223194481718`", ",", "0.31777005153695204`", ",", 
         "0.06764866588651064`", ",", "0.253564252572649`", ",", 
         "0.4063395166218688`", ",", "0.37500673023493075`", ",", 
         "0.452907872502767`", ",", "0.7859743069146569`", ",", 
         "0.6404508031943512`", ",", "0.5862463752740912`", ",", 
         "0.3113689015349001`", ",", "0.3585926419910114`", ",", 
         "0.8096961171457827`", ",", "0.25377923461503393`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.6716224676986143`", ",", "0.2352820479537385`", ",", 
         "0.010209763789677027`", ",", "0.008602805835246124`"}], "}"}], ",", 
       
       RowBox[{"{", 
        RowBox[{
        "0.8748727742272812`", ",", "0.3002874831801531`", ",", 
         "0.9081952680746609`", ",", "0.5106114091218693`", ",", 
         "0.8169327725348497`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "3"}], "}"}]}], "}"}], ",", 
       "0.7504223131491002`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "173.60404198139338`"}], ",", 
       RowBox[{"-", "151.0649530276334`"}], ",", 
       RowBox[{"-", "163.18585755273818`"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.14507294862648915`", ",", "0.19284135758491727`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.7492841066483391`", ",", "0.49685806057645127`", ",", 
         "0.7387334320046204`", ",", "0.8178346273499865`", ",", 
         "0.2963762341455721`", ",", "0.7108837536617945`", ",", 
         "0.09828262881026915`", ",", "0.23158825207589534`", ",", 
         "0.985007332610672`", ",", "0.3522911116707831`", ",", 
         "0.28858651166448646`", ",", "0.9778090174608614`", ",", 
         "0.3133848649120577`", ",", "0.11700906371704457`", ",", 
         "0.2783767478748094`", ",", "0.9692062116256153`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.4385120906847765`", ",", "0.8167215805368915`", ",", 
         "0.37018147980014854`", ",", "0.458594802503746`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.6215793181499267`", ",", "0.06629926738779122`", ",", 
         "0.22510853117365942`", ",", "0.26575344491882874`", ",", 
         "0.8722952115015876`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"3", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "4"}], "}"}]}], "}"}], ",", 
       "0.5694412068113399`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "83.02512575002937`"}], ",", 
       RowBox[{"-", "71.82327023717085`"}], ",", 
       RowBox[{"-", "82.02646117827996`"}]}], "}"}]}], "}"}]}], 
  "}"}]], "Output",
 CellChangeTimes->{
  3.526412652972857*^9, 3.52641269400252*^9, {3.5264128496081448`*^9, 
   3.52641286549189*^9}, 3.526412978070984*^9, 3.526413030610743*^9, 
   3.526413072023435*^9, 3.5264131800918207`*^9, {3.526413217870302*^9, 
   3.526413282891789*^9}, 3.5264133159519577`*^9, {3.526413430154264*^9, 
   3.526413435298602*^9}, 3.5264137003023787`*^9, 3.526413731686533*^9, 
   3.526414085926256*^9, 3.5264276576259403`*^9, {3.526430663343699*^9, 
   3.526430668466977*^9}, 3.5264307454436893`*^9, 3.527038804304483*^9, 
   3.527108561908823*^9, 3.527108737354722*^9, 3.527112097105997*^9, {
   3.527112179903002*^9, 3.527112205803879*^9}, 3.527125299316855*^9}]
}, Open  ]]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["dqfuncd\[Tau] and dqfuncdqlog\[Lambda]", "Subsection",
 CellChangeTimes->{{3.525095319326301*^9, 3.525095320059371*^9}, {
  3.52509801721535*^9, 3.525098017925005*^9}, {3.525181353753007*^9, 
  3.525181356624176*^9}, {3.525181497944603*^9, 3.525181498071718*^9}, {
  3.5265179194497232`*^9, 3.526517932232986*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"Clear", "[", "makevararray", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"makevararray", "[", 
    RowBox[{"s_", ",", " ", "n_"}], "]"}], " ", ":=", " ", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"ToExpression", "[", 
      RowBox[{"s", " ", "<>", " ", 
       RowBox[{"ToString", "[", "i", "]"}]}], "]"}], ",", " ", 
     RowBox[{"{", " ", 
      RowBox[{"i", ",", " ", "1", ",", " ", "n"}], " ", "}"}]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Clear", "[", "makevarmatrix", "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"makevarmatrix", "[", 
    RowBox[{"s_", ",", " ", "m_", ",", " ", "n_"}], "]"}], " ", ":=", " ", 
   "\[IndentingNewLine]", 
   RowBox[{"Table", "[", 
    RowBox[{
     RowBox[{"makevararray", "[", 
      RowBox[{
       RowBox[{"s", "<>", " ", 
        RowBox[{"ToString", "[", "i", "]"}]}], ",", " ", "n"}], "]"}], ",", 
     " ", 
     RowBox[{"{", " ", 
      RowBox[{"i", ",", " ", "1", ",", " ", "m"}], " ", "}"}]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Clear", "[", "dqfuncd\[Tau]", "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"dqfuncd\[Tau]", "[", 
    RowBox[{
    "\[Kappa]_", ",", " ", "log\[Alpha]_", ",", " ", "\[Tau]_", ",", " ", 
     "log\[Lambda]_", ",", " ", "pz_", ",", "d_", ",", " ", "plog\[Alpha]_"}],
     "]"}], " ", ":=", " ", 
   RowBox[{
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"qfunc", "[", 
       RowBox[{"\[Kappa]", ",", " ", "log\[Alpha]", ",", " ", 
        RowBox[{"makevarmatrix", "[", 
         RowBox[{"\"\<\[Tau]\>\"", ",", " ", 
          RowBox[{"Length", "[", "\[Tau]", "]"}], ",", " ", 
          RowBox[{"Length", "[", 
           RowBox[{"\[Tau]", "[", 
            RowBox[{"[", "1", "]"}], "]"}], "]"}]}], "]"}], ",", " ", 
        "log\[Lambda]", ",", " ", "pz", ",", "d", ",", " ", "plog\[Alpha]"}], 
       "]"}], ",", " ", 
      RowBox[{"{", "  ", 
       RowBox[{"makevarmatrix", "[", 
        RowBox[{"\"\<\[Tau]\>\"", ",", " ", 
         RowBox[{"Length", "[", "\[Tau]", "]"}], ",", " ", 
         RowBox[{"Length", "[", 
          RowBox[{"\[Tau]", "[", 
           RowBox[{"[", "1", "]"}], "]"}], "]"}]}], "]"}], " ", "}"}]}], 
     "]"}], " ", "/.", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"ToExpression", "[", 
        RowBox[{
         RowBox[{"ToString", "[", 
          RowBox[{"#", "[", 
           RowBox[{"[", "1", "]"}], "]"}], "]"}], " ", "<>", " ", 
         "\"\< -> \>\"", " ", "<>", " ", 
         RowBox[{"ToString", "[", 
          RowBox[{"#", "[", 
           RowBox[{"[", "2", "]"}], "]"}], "]"}]}], "]"}], "&"}], " ", "/@", 
      RowBox[{"Transpose", "[", 
       RowBox[{"{", " ", "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{"Flatten", "[", 
          RowBox[{"makevarmatrix", "[", 
           RowBox[{"\"\<\[Tau]\>\"", ",", " ", 
            RowBox[{"Length", "[", "\[Tau]", "]"}], ",", " ", 
            RowBox[{"Length", "[", 
             RowBox[{"\[Tau]", "[", 
              RowBox[{"[", "1", "]"}], "]"}], "]"}]}], "]"}], "]"}], ",", 
         RowBox[{"Flatten", "[", 
          RowBox[{"Table", "[", 
           RowBox[{
            RowBox[{"\[Tau]", "[", 
             RowBox[{"[", 
              RowBox[{"i", ",", " ", "j"}], "]"}], "]"}], ",", " ", 
            RowBox[{"{", " ", 
             RowBox[{"i", ",", " ", "1", ",", " ", 
              RowBox[{"Length", "[", "\[Tau]", "]"}]}], "}"}], ",", " ", 
            RowBox[{"{", " ", 
             RowBox[{"j", ",", " ", "1", ",", " ", 
              RowBox[{"Length", "[", 
               RowBox[{"\[Tau]", "[", 
                RowBox[{"[", "1", "]"}], "]"}], "]"}]}], "}"}]}], "]"}], 
          "]"}]}], "}"}], "]"}]}], ")"}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Clear", "[", "dqfuncdlog\[Lambda]", "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"dqfuncdlog\[Lambda]", "[", 
    RowBox[{
    "\[Kappa]_", ",", " ", "log\[Alpha]_", ",", " ", "\[Tau]_", ",", " ", 
     "log\[Lambda]_", ",", " ", "pz_", ",", "d_", ",", " ", "plog\[Alpha]_"}],
     "]"}], " ", ":=", " ", 
   RowBox[{
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"qfunc", "[", 
       RowBox[{"\[Kappa]", ",", " ", "log\[Alpha]", ",", "\[Tau]", ",", " ", 
        RowBox[{"makevararray", "[", 
         RowBox[{"\"\<log\[Lambda]\>\"", ",", " ", 
          RowBox[{"Length", "[", "log\[Lambda]", "]"}]}], "]"}], ",", "pz", 
        ",", "d", ",", " ", "plog\[Alpha]"}], "]"}], ",", " ", 
      RowBox[{"{", "  ", 
       RowBox[{"makevararray", "[", 
        RowBox[{"\"\<log\[Lambda]\>\"", ",", " ", 
         RowBox[{"Length", "[", "log\[Lambda]", "]"}]}], "]"}], " ", "}"}]}], 
     "]"}], " ", "/.", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"ToExpression", "[", 
        RowBox[{
         RowBox[{"ToString", "[", 
          RowBox[{"#", "[", 
           RowBox[{"[", "1", "]"}], "]"}], "]"}], " ", "<>", " ", 
         "\"\< -> \>\"", " ", "<>", " ", 
         RowBox[{"ToString", "[", 
          RowBox[{"#", "[", 
           RowBox[{"[", "2", "]"}], "]"}], "]"}]}], "]"}], "&"}], " ", "/@", 
      RowBox[{"Transpose", "[", 
       RowBox[{"{", " ", 
        RowBox[{
         RowBox[{"makevararray", "[", 
          RowBox[{"\"\<log\[Lambda]\>\"", ",", " ", 
           RowBox[{"Length", "[", "log\[Lambda]", "]"}]}], "]"}], ",", 
         "log\[Lambda]"}], " ", "}"}], "]"}]}], ")"}]}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.5265625751603403`*^9, 3.52656264492064*^9}, {
  3.526562676614012*^9, 3.52656286068789*^9}, {3.5265629411796217`*^9, 
  3.526563034031913*^9}}],

Cell[CellGroupData[{

Cell["Test Vectors for dqfunc", "Subsubsection",
 CellChangeTimes->{{3.50401932583255*^9, 3.504019328703233*^9}, {
  3.504185890254962*^9, 3.504185890709035*^9}, {3.5042036574835863`*^9, 
  3.504203657569166*^9}, {3.504916768505199*^9, 3.504916769023423*^9}, {
  3.5264122361917953`*^9, 3.526412241984367*^9}, {3.52656288649238*^9, 
  3.52656288710295*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"Clear", "[", "nworkers", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"nworkers", " ", "=", " ", "4"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Clear", "[", "nlabels", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"nlabels", " ", "=", " ", "5"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Clear", "[", "nratings", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"nratings", " ", "=", " ", "8"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"{", " ", 
    RowBox[{
     RowBox[{
      RowBox[{
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"ListQ", "[", "#", "]"}], " ", "&&", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"!", " ", 
             RowBox[{"ListQ", "[", 
              RowBox[{"#", "[", 
               RowBox[{"[", "1", "]"}], "]"}], "]"}]}], " ", "||", " ", 
            RowBox[{"!", " ", 
             RowBox[{"IntegerQ", "[", 
              RowBox[{
               RowBox[{"#", "[", 
                RowBox[{"[", "1", "]"}], "]"}], "[", 
               RowBox[{"[", "1", "]"}], "]"}], "]"}]}]}], ")"}]}], ",", " ", 
         RowBox[{"Flatten", "[", "#", "]"}], ",", " ", "#"}], "]"}], "&"}], 
      " ", "/@", " ", "#"}], ",", " ", "\[IndentingNewLine]", 
     RowBox[{"{", " ", 
      RowBox[{
       RowBox[{
        RowBox[{"dqfuncd\[Tau]", "[", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"#", "[", 
           RowBox[{"[", "1", "]"}], "]"}], ",", " ", 
          RowBox[{"(*", " ", "\[Kappa]", " ", "*)"}], "\[IndentingNewLine]", 
          RowBox[{"#", "[", 
           RowBox[{"[", "2", "]"}], "]"}], ",", " ", 
          RowBox[{"(*", " ", "log\[Alpha]", " ", "*)"}], 
          "\[IndentingNewLine]", 
          RowBox[{"Table", "[", 
           RowBox[{
            RowBox[{"Table", "[", 
             RowBox[{
              RowBox[{"j", "  ", "-", " ", "0.5", " ", "+", " ", 
               RowBox[{
                RowBox[{
                 RowBox[{"#", "[", 
                  RowBox[{"[", "3", "]"}], "]"}], "[", 
                 RowBox[{"[", "k", "]"}], "]"}], "[", 
                RowBox[{"[", "j", "]"}], "]"}]}], ",", 
              RowBox[{"{", " ", 
               RowBox[{"j", ",", " ", "1", ",", " ", 
                RowBox[{"Length", "[", 
                 RowBox[{
                  RowBox[{"#", "[", 
                   RowBox[{"[", "3", "]"}], "]"}], "[", 
                  RowBox[{"[", "k", "]"}], "]"}], "]"}]}], "}"}]}], "]"}], 
            ",", " ", 
            RowBox[{"{", " ", 
             RowBox[{"k", ",", " ", "1", ",", " ", 
              RowBox[{"Length", "[", 
               RowBox[{"#", "[", 
                RowBox[{"[", "3", "]"}], "]"}], "]"}]}], "}"}]}], "]"}], ",", 
          
          RowBox[{"(*", " ", "\[Tau]", " ", "*)"}], "\[IndentingNewLine]", 
          RowBox[{"#", "[", 
           RowBox[{"[", "4", "]"}], "]"}], ",", " ", 
          RowBox[{"(*", " ", "log\[Lambda]", " ", "*)"}], 
          "\[IndentingNewLine]", 
          RowBox[{"#", "[", 
           RowBox[{"[", "5", "]"}], "]"}], ",", " ", 
          RowBox[{"(*", " ", "pz", " ", "*)"}], "\[IndentingNewLine]", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"{", 
              RowBox[{
               RowBox[{"1", "+", 
                RowBox[{"#", "[", 
                 RowBox[{"[", "1", "]"}], "]"}]}], ",", 
               RowBox[{"#", "[", 
                RowBox[{"[", "2", "]"}], "]"}]}], "}"}], "&"}], " ", "/@", 
            " ", 
            RowBox[{"#", "[", 
             RowBox[{"[", "6", "]"}], "]"}]}], ")"}], ",", " ", 
          RowBox[{"(*", " ", "d", " ", "*)"}], 
          RowBox[{"Function", "[", 
           RowBox[{"x", ",", " ", 
            RowBox[{"NormalDistribution", "[", 
             RowBox[{"x", ",", " ", 
              RowBox[{"#", "[", 
               RowBox[{"[", "7", "]"}], "]"}]}], "]"}]}], "]"}]}], " ", 
         RowBox[{"(*", " ", "plog\[Alpha]", " ", "*)"}], 
         "\[IndentingNewLine]", "]"}], " ", "//", " ", "Flatten"}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{"dqfuncdlog\[Lambda]", "[", "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{"#", "[", 
          RowBox[{"[", "1", "]"}], "]"}], ",", " ", 
         RowBox[{"(*", " ", "\[Kappa]", " ", "*)"}], "\[IndentingNewLine]", 
         RowBox[{"#", "[", 
          RowBox[{"[", "2", "]"}], "]"}], ",", " ", 
         RowBox[{"(*", " ", "log\[Alpha]", " ", "*)"}], "\[IndentingNewLine]", 
         RowBox[{"Table", "[", 
          RowBox[{
           RowBox[{"Table", "[", 
            RowBox[{
             RowBox[{"j", "  ", "-", " ", "0.5", " ", "+", " ", 
              RowBox[{
               RowBox[{
                RowBox[{"#", "[", 
                 RowBox[{"[", "3", "]"}], "]"}], "[", 
                RowBox[{"[", "k", "]"}], "]"}], "[", 
               RowBox[{"[", "j", "]"}], "]"}]}], ",", 
             RowBox[{"{", " ", 
              RowBox[{"j", ",", " ", "1", ",", " ", 
               RowBox[{"Length", "[", 
                RowBox[{
                 RowBox[{"#", "[", 
                  RowBox[{"[", "3", "]"}], "]"}], "[", 
                 RowBox[{"[", "k", "]"}], "]"}], "]"}]}], "}"}]}], "]"}], ",",
            " ", 
           RowBox[{"{", " ", 
            RowBox[{"k", ",", " ", "1", ",", " ", 
             RowBox[{"Length", "[", 
              RowBox[{"#", "[", 
               RowBox[{"[", "3", "]"}], "]"}], "]"}]}], "}"}]}], "]"}], ",", 
         RowBox[{"(*", " ", "\[Tau]", " ", "*)"}], "\[IndentingNewLine]", 
         RowBox[{"#", "[", 
          RowBox[{"[", "4", "]"}], "]"}], ",", " ", 
         RowBox[{"(*", " ", "log\[Lambda]", " ", "*)"}], 
         "\[IndentingNewLine]", 
         RowBox[{"#", "[", 
          RowBox[{"[", "5", "]"}], "]"}], ",", " ", 
         RowBox[{"(*", " ", "pz", " ", "*)"}], "\[IndentingNewLine]", 
         RowBox[{"(", 
          RowBox[{
           RowBox[{
            RowBox[{"{", 
             RowBox[{
              RowBox[{"1", "+", 
               RowBox[{"#", "[", 
                RowBox[{"[", "1", "]"}], "]"}]}], ",", 
              RowBox[{"#", "[", 
               RowBox[{"[", "2", "]"}], "]"}]}], "}"}], "&"}], " ", "/@", " ", 
           RowBox[{"#", "[", 
            RowBox[{"[", "6", "]"}], "]"}]}], ")"}], ",", " ", 
         RowBox[{"(*", " ", "d", " ", "*)"}], 
         RowBox[{"Function", "[", 
          RowBox[{"x", ",", " ", 
           RowBox[{"NormalDistribution", "[", 
            RowBox[{"x", ",", " ", 
             RowBox[{"#", "[", 
              RowBox[{"[", "7", "]"}], "]"}]}], "]"}]}], "]"}]}], " ", 
        RowBox[{"(*", " ", "plog\[Alpha]", " ", "*)"}], "\[IndentingNewLine]",
         "]"}]}], "\[IndentingNewLine]", "}"}]}], "\[IndentingNewLine]", 
    "}"}], "&"}], "/@", "\[IndentingNewLine]", 
  RowBox[{"Table", "[", 
   RowBox[{
    RowBox[{"{", " ", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"Random", "[", "]"}], ",", " ", 
      RowBox[{"(*", " ", "\[Kappa]", " ", "*)"}], "\[IndentingNewLine]", 
      RowBox[{"Random", "[", "]"}], ",", " ", 
      RowBox[{"(*", " ", "log\[Alpha]", " ", "*)"}], "\[IndentingNewLine]", 
      RowBox[{"Table", "[", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"Random", "[", "]"}], ",", " ", 
          RowBox[{"{", " ", 
           RowBox[{"i", ",", " ", "1", ",", " ", 
            RowBox[{"nlabels", " ", "-", " ", "1"}]}], "}"}]}], "]"}], ",", 
        " ", 
        RowBox[{"{", " ", 
         RowBox[{"k", ",", " ", "1", ",", " ", "nworkers"}], "}"}]}], "]"}], 
      ",", " ", 
      RowBox[{"(*", " ", "\[Tau]", " ", "*)"}], "\[IndentingNewLine]", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{"Random", "[", "]"}], ",", " ", 
        RowBox[{"{", " ", 
         RowBox[{"i", ",", " ", "1", ",", " ", "nworkers"}], " ", "}"}]}], 
       "]"}], ",", " ", 
      RowBox[{"(*", " ", "log\[Lambda]", " ", "*)"}], "\[IndentingNewLine]", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{"Random", "[", "]"}], ",", " ", 
        RowBox[{"{", " ", 
         RowBox[{"i", ",", " ", "1", ",", " ", "nlabels"}], " ", "}"}]}], 
       "]"}], ",", " ", 
      RowBox[{"(*", " ", "pz", " ", "*)"}], "\[IndentingNewLine]", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{"{", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"Random", "[", 
           RowBox[{"Integer", ",", " ", 
            RowBox[{"nworkers", " ", "-", " ", "1"}]}], "]"}], ",", 
          "\[IndentingNewLine]", 
          RowBox[{"Random", "[", 
           RowBox[{"Integer", ",", " ", 
            RowBox[{"nlabels", " ", "-", " ", "1"}]}], "]"}]}], 
         "\[IndentingNewLine]", "}"}], ",", " ", 
        RowBox[{"{", " ", 
         RowBox[{"i", ",", " ", "1", ",", " ", "nratings"}], " ", "}"}]}], 
       "]"}], ",", " ", 
      RowBox[{"(*", " ", "d", " ", "*)"}], "\[IndentingNewLine]", 
      RowBox[{"Random", "[", "]"}]}], " ", 
     RowBox[{"(*", " ", 
      RowBox[{"plog\[Alpha]", " ", "stddev"}], " ", "*)"}], 
     "\[IndentingNewLine]", "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{"{", " ", 
     RowBox[{"foo", ",", " ", "1", ",", " ", "6"}], " ", "}"}]}], 
   "]"}]}]}], "Input",
 CellChangeTimes->{{3.504016424813343*^9, 3.504016580297758*^9}, {
   3.504018269599441*^9, 3.504018279219314*^9}, {3.504018359153508*^9, 
   3.504018387475568*^9}, {3.5040184327040863`*^9, 3.504018509500141*^9}, {
   3.504018861653284*^9, 3.504018920277594*^9}, {3.504019049785894*^9, 
   3.504019065803638*^9}, 3.504019184180941*^9, {3.504059801963703*^9, 
   3.504059813764331*^9}, 3.5040599982883453`*^9, {3.504060100407703*^9, 
   3.504060104803857*^9}, 3.504060440796597*^9, {3.504060503267675*^9, 
   3.504060525182757*^9}, {3.50456047953319*^9, 3.504560681387557*^9}, {
   3.504577463729417*^9, 3.504577464011519*^9}, {3.504577589051256*^9, 
   3.504577590132493*^9}, {3.504577632742776*^9, 3.5045776330605373`*^9}, {
   3.504740502012248*^9, 3.504740503922497*^9}, {3.504740727150861*^9, 
   3.504740736352736*^9}, 3.504876469621917*^9, {3.5055962008030443`*^9, 
   3.505596275077857*^9}, {3.505596319880871*^9, 3.505596373226162*^9}, {
   3.505596415459552*^9, 3.505596505766666*^9}, {3.50559654044011*^9, 
   3.505596540734797*^9}, 3.505672802683957*^9, 3.5056942774993753`*^9, {
   3.505694366620678*^9, 3.505694366726482*^9}, {3.5057600362594757`*^9, 
   3.5057600462592773`*^9}, 3.505760218072028*^9, {3.5057618784831467`*^9, 
   3.5057618855096197`*^9}, {3.505765314690784*^9, 3.505765460997046*^9}, {
   3.505765519815023*^9, 3.505765560295491*^9}, 3.505765708877458*^9, {
   3.5059422297177*^9, 3.50594224933794*^9}, {3.5059422915411587`*^9, 
   3.5059423868650618`*^9}, {3.505942419849204*^9, 3.505942458271961*^9}, 
   3.506003797955632*^9, 3.522544655482306*^9, 3.522544695510792*^9, {
   3.526412258232821*^9, 3.5264124297647047`*^9}, {3.526412534152213*^9, 
   3.526412549418888*^9}, {3.526412580963234*^9, 3.526412612442492*^9}, {
   3.52641284537436*^9, 3.526412862526091*^9}, {3.526412977275703*^9, 
   3.526412977409284*^9}, {3.5264130300128517`*^9, 3.526413071567891*^9}, {
   3.5264131895823917`*^9, 3.5264131965298567`*^9}, {3.5264133128542147`*^9, 
   3.526413315530311*^9}, {3.526413392188962*^9, 3.5264134345921392`*^9}, {
   3.526413727365831*^9, 3.526413730697576*^9}, {3.52641407631104*^9, 
   3.526414085568967*^9}, 3.526430667444561*^9, 3.52643074409554*^9, {
   3.526562890803769*^9, 3.526562909342167*^9}, {3.526563039918169*^9, 
   3.5265630452180443`*^9}, {3.526563122063406*^9, 3.5265631259244967`*^9}, 
   3.526564681019143*^9, 3.52656472738325*^9, {3.52703889641495*^9, 
   3.52703889982553*^9}, {3.527108798924241*^9, 3.527108799016884*^9}, {
   3.527109231248084*^9, 3.527109252920747*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.5562700197585433`", ",", "0.8961061807612548`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.47193939075376246`", ",", "0.5920142869083285`", ",", 
         "0.08166132490347165`", ",", "0.8942708518946989`", ",", 
         "0.9881554266463932`", ",", "0.9851551128538435`", ",", 
         "0.44963961837060995`", ",", "0.1922220713525074`", ",", 
         "0.7500612179870189`", ",", "0.22144472263720066`", ",", 
         "0.19723251420619056`", ",", "0.039750100768585275`", ",", 
         "0.49737374788409505`", ",", "0.7079238182012267`", ",", 
         "0.22063823226259355`", ",", "0.9305575190461826`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.05232318214370451`", ",", "0.4495552457872182`", ",", 
         "0.17559458642478576`", ",", "0.6144612492656195`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.7345226988084851`", ",", "0.205768512514852`", ",", 
         "0.6193245666662425`", ",", "0.7183550685043647`", ",", 
         "0.26258330805472263`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"3", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "3"}], "}"}]}], "}"}], ",", 
       "0.6137542256065235`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"0", ",", "0", ",", "0", ",", "0", ",", 
         RowBox[{"-", "7.507195116832142`"}], ",", 
         RowBox[{"-", "11.710875840713474`"}], ",", 
         RowBox[{"-", "14.552066173137078`"}], ",", "1.729718025994186`", ",", 
         RowBox[{"-", "5.071404073891716`"}], ",", "8.270481723540986`", ",", 
         "4.927503100006712`", ",", "1.7463658099719201`", ",", 
         "7.91660009381545`", ",", "9.403352846274732`", ",", 
         "3.4484999426363263`", ",", "0.6063562652398601`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{"0", ",", 
         RowBox[{"-", "51.43413599556069`"}], ",", 
         RowBox[{"-", "17.821060767469916`"}], ",", 
         RowBox[{"-", "73.42148708445073`"}]}], "}"}]}], "}"}]}], "}"}], ",", 
   
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.5376632417627709`", ",", "0.8240842166096658`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.2744278814083294`", ",", "0.62859911275268`", ",", 
         "0.0880236233921609`", ",", "0.6318621452571584`", ",", 
         "0.5243666634213106`", ",", "0.4071543901154793`", ",", 
         "0.8907911091859704`", ",", "0.5921120444885731`", ",", 
         "0.02699291553721549`", ",", "0.6992305719142526`", ",", 
         "0.6701528769233768`", ",", "0.6615545254423906`", ",", 
         "0.9746697333935109`", ",", "0.2496753261270344`", ",", 
         "0.494558290498591`", ",", "0.04709327617677105`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.24014703458502587`", ",", "0.0439068136121824`", ",", 
         "0.8752337238323485`", ",", "0.32873820767240636`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.9775637265303032`", ",", "0.43015258800565886`", ",", 
         "0.3375704820695776`", ",", "0.5046539910627404`", ",", 
         "0.7031358451219738`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "4"}], "}"}]}], "}"}], ",", 
       "0.8015534752529788`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "5.98587089256036`"}], ",", 
         RowBox[{"-", "9.242818563537897`"}], ",", 
         RowBox[{"-", "2.1657391211963275`"}], ",", 
         RowBox[{"-", "6.841968166821495`"}], ",", 
         RowBox[{"-", "5.345644278946993`"}], ",", 
         RowBox[{"-", "7.4547570404976895`"}], ",", 
         RowBox[{"-", "3.3615763385362225`"}], ",", "1.366446005222525`", ",",
          "0", ",", "0", ",", "0", ",", "0", ",", 
         RowBox[{"-", "16.88473284609055`"}], ",", 
         RowBox[{"-", "19.25339684878727`"}], ",", 
         RowBox[{"-", "15.650752708561198`"}], ",", 
         RowBox[{"-", "11.048959704113692`"}]}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "50.902672578205454`"}], ",", 
         RowBox[{"-", "27.008415872821047`"}], ",", "0", ",", 
         RowBox[{"-", "121.39286628219176`"}]}], "}"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.24954685867741674`", ",", "0.872791845805582`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.17876918170066322`", ",", "0.3943990851374995`", ",", 
         "0.3587557494914464`", ",", "0.28067980131700887`", ",", 
         "0.15177626616344772`", ",", "0.6951685132232469`", ",", 
         "0.6886028725680696`", ",", "0.6191252758746183`", ",", 
         "0.17710653276993676`", ",", "0.4454931870962125`", ",", 
         "0.19404458206947858`", ",", "0.5720319996978472`", ",", 
         "0.9369594981849109`", ",", "0.4015863734840301`", ",", 
         "0.31881085823713007`", ",", "0.24329379202544094`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.9593957716546077`", ",", "0.9714337854783712`", ",", 
         "0.9812403761675524`", ",", "0.7386398009627004`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.2562599265326339`", ",", "0.16988031022539238`", ",", 
         "0.7316935174901357`", ",", "0.8658479551571184`", ",", 
         "0.07749074483197066`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"2", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "2"}], "}"}]}], "}"}], ",", 
       "0.7754812250878929`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "1.7040063271102324`"}], ",", 
         RowBox[{"-", "4.213774744290186`"}], ",", 
         RowBox[{"-", "8.79550287992394`"}], ",", "0.41496758738728756`", ",", 
         RowBox[{"-", "3.404288012649604`"}], ",", "13.966176692509416`", ",",
          "3.5159912422995774`", ",", "0.3145843540503816`", ",", 
         RowBox[{"-", "3.475068242146595`"}], ",", "4.136851887388442`", ",", 
         
         RowBox[{"-", "2.6780855374560257`"}], ",", 
         RowBox[{"-", "13.023841510813737`"}], ",", 
         RowBox[{"-", "6.382730296724937`"}], ",", 
         RowBox[{"-", "10.694805216881479`"}], ",", "0.07176824163715967`", 
         ",", "1.1318098732396107`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "15.146291939555962`"}], ",", 
         RowBox[{"-", "12.405864100246449`"}], ",", 
         RowBox[{"-", "50.16462568725343`"}], ",", 
         RowBox[{"-", "25.553058551292075`"}]}], "}"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.3729377679986892`", ",", "0.5851681538401095`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.925714478668523`", ",", "0.08031271186464599`", ",", 
         "0.6843348954306196`", ",", "0.9660428779654912`", ",", 
         "0.7486079458985861`", ",", "0.6348195247684335`", ",", 
         "0.49029031336114104`", ",", "0.3940108782676439`", ",", 
         "0.8116484477136753`", ",", "0.23323315128440342`", ",", 
         "0.171479455124011`", ",", "0.150717086242203`", ",", 
         "0.8522526760590676`", ",", "0.2617993658060322`", ",", 
         "0.19023907895645858`", ",", "0.41207728527950255`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.5959927495264338`", ",", "0.09191905558063983`", ",", 
         "0.4585455614663229`", ",", "0.5462293301223842`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.5185020046944631`", ",", "0.31643783049274693`", ",", 
         "0.0856077934676337`", ",", "0.9610611762822747`", ",", 
         "0.5927875260259401`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"3", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "4"}], "}"}]}], "}"}], ",", 
       "0.23612511862810096`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "2.4823678261390594`"}], ",", "5.28977974333727`", ",", 
         "2.938931218781679`", ",", "0.33743343970506834`", ",", 
         "2.205160840926336`", ",", "1.137189103922918`", ",", 
         "4.110857588149424`", ",", "1.490598643907962`", ",", "0", ",", "0", 
         ",", "0", ",", "0", ",", 
         RowBox[{"-", "3.884806527128623`"}], ",", "1.995775216559169`", ",", 
         
         RowBox[{"-", "2.9174510742008444`"}], ",", 
         RowBox[{"-", "9.555563001335802`"}]}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "12.99883484074769`"}], ",", 
         RowBox[{"-", "16.17487578079031`"}], ",", "0", ",", 
         RowBox[{"-", "93.605401488349`"}]}], "}"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.40127289803701405`", ",", "0.9950182983167835`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.844179580127354`", ",", "0.6013055938596674`", ",", 
         "0.910982584675873`", ",", "0.6010074200491395`", ",", 
         "0.032531132413678665`", ",", "0.368072442575264`", ",", 
         "0.739503129551862`", ",", "0.45029033380693656`", ",", 
         "0.18027845635461107`", ",", "0.10627307676923181`", ",", 
         "0.5492640505954034`", ",", "0.03821304852743399`", ",", 
         "0.5842857068281774`", ",", "0.01435402118859198`", ",", 
         "0.0907184891290805`", ",", "0.4919837184050498`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.06578370213371428`", ",", "0.697916190695845`", ",", 
         "0.005110695661446802`", ",", "0.5309225421227751`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.47299617610777417`", ",", "0.46179107206774406`", ",", 
         "0.6038377976244327`", ",", "0.5359042438059917`", ",", 
         "0.6288165959804202`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"1", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "3"}], "}"}]}], "}"}], ",", 
       "0.8604854782080766`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
        "5.859505059093763`", ",", "8.144757002236801`", ",", 
         "0.2261872236320004`", ",", "2.868277847552064`", ",", 
         RowBox[{"-", "2.6183407405605994`"}], ",", 
         RowBox[{"-", "6.141227256489287`"}], ",", 
         RowBox[{"-", "10.672133244748712`"}], ",", "1.9286100878137231`", 
         ",", "0", ",", "0", ",", "0", ",", "0", ",", "2.2833184648137133`", 
         ",", 
         RowBox[{"-", "1.0035198810889003`"}], ",", "3.1306262349828353`", 
         ",", 
         RowBox[{"-", "7.952523636084054`"}]}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "51.799888030935406`"}], ",", 
         RowBox[{"-", "26.66508028290718`"}], ",", "0", ",", 
         RowBox[{"-", "84.07028155448987`"}]}], "}"}]}], "}"}]}], "}"}], ",", 
   
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.6928552129485597`", ",", "0.9348968237568521`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.5962854635667415`", ",", "0.4924130356328126`", ",", 
         "0.9533520833966976`", ",", "0.4846064899499155`", ",", 
         "0.41600700721213046`", ",", "0.38613995886358077`", ",", 
         "0.40408803280129424`", ",", "0.44639344142248155`", ",", 
         "0.8317213003839532`", ",", "0.3717859376749888`", ",", 
         "0.31336954367221376`", ",", "0.9544097230174318`", ",", 
         "0.7659375982502389`", ",", "0.6738697469791438`", ",", 
         "0.3082588480107669`", ",", "0.4234871808946566`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.2929414221424647`", ",", "0.2120786749113997`", ",", 
         "0.7044210503863342`", ",", "0.887582937088665`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.6641248261620445`", ",", "0.3515931967033231`", ",", 
         "0.0115658374377745`", ",", "0.9526861133318129`", ",", 
         "0.06783936259530299`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"1", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "3"}], "}"}]}], "}"}], ",", 
       "0.8591801610705105`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "2.9038493443830706`"}], ",", 
         RowBox[{"-", "3.554005006904343`"}], ",", "0.7871992036031916`", ",",
          "0.12967270845862752`", ",", 
         RowBox[{"-", "4.890429099078287`"}], ",", 
         RowBox[{"-", "6.424212658541782`"}], ",", 
         RowBox[{"-", "8.993609818559058`"}], ",", 
         RowBox[{"-", "12.499256389517416`"}], ",", 
         RowBox[{"-", "14.848110923107491`"}], ",", 
         RowBox[{"-", "15.76227935166866`"}], ",", "1.1426541390855185`", ",",
          "0.09778240235992587`", ",", "0.8074906405003626`", ",", 
         "12.64858168231483`", ",", "9.865047383346546`", ",", 
         "0.5468298262110869`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "7.941761279625688`"}], ",", 
         RowBox[{"-", "58.100233646242536`"}], ",", 
         RowBox[{"-", "53.90045165857199`"}], ",", 
         RowBox[{"-", "31.003864401027407`"}]}], "}"}]}], "}"}]}], "}"}]}], 
  "}"}]], "Output",
 CellChangeTimes->{
  3.5265629107187557`*^9, 3.526563047690802*^9, 3.526563126587101*^9, 
   3.5265646822242413`*^9, 3.526564727985888*^9, 3.527038906473196*^9, 
   3.527108799275917*^9, {3.5271092325322847`*^9, 3.5271092533078623`*^9}, 
   3.527112291672285*^9}]
}, Open  ]]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["Mstep (log\[Alpha])", "Subsection",
 CellChangeTimes->{{3.525095319326301*^9, 3.525095320059371*^9}, {
  3.52509801721535*^9, 3.525098017925005*^9}, {3.525112791223256*^9, 
  3.525112791828678*^9}, {3.525115293972691*^9, 3.525115296179682*^9}, {
  3.5264923374180117`*^9, 3.526492338566841*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"Clear", "[", "mstep", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"mstep", "[", 
     RowBox[{
     "\[Kappa]_", ",", " ", "log\[Alpha]_", ",", " ", "\[Tau]_", ",", " ", 
      "log\[Lambda]_", ",", " ", "pz_", ",", "d_", ",", " ", 
      "plog\[Alpha]_"}], "]"}], " ", ":=", " ", 
    RowBox[{"Module", "[", 
     RowBox[{
      RowBox[{"{", " ", 
       RowBox[{"q", ",", " ", "vars", ",", " ", "log\[Alpha]new"}], " ", 
       "}"}], ",", "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{
        RowBox[{"{", " ", 
         RowBox[{"q", ",", " ", "vars"}], "}"}], " ", "=", " ", 
        "\[IndentingNewLine]", 
        RowBox[{"FindMaximum", "[", 
         RowBox[{
          RowBox[{"qfunc", "[", 
           RowBox[{
           "\[Kappa]", ",", " ", "log\[Alpha]new", ",", " ", "\[Tau]", ",", 
            " ", "log\[Lambda]", ",", " ", "pz", ",", "d", ",", " ", 
            "plog\[Alpha]"}], "]"}], ",", " ", 
          RowBox[{"{", 
           RowBox[{"log\[Alpha]new", ",", " ", "log\[Alpha]"}], "}"}], ",", 
          "\[IndentingNewLine]", 
          RowBox[{"AccuracyGoal", " ", "\[Rule]", " ", "10"}], ",", " ", 
          RowBox[{"PrecisionGoal", "\[Rule]", "10"}], ",", " ", 
          RowBox[{"WorkingPrecision", "\[Rule]", " ", "20"}]}], 
         "\[IndentingNewLine]", "]"}]}], ";", "\[IndentingNewLine]", 
       RowBox[{"{", " ", 
        RowBox[{"q", ",", " ", 
         RowBox[{"log\[Alpha]new", " ", "/.", " ", "vars"}]}], " ", "}"}]}]}],
      "\[IndentingNewLine]", "]"}]}], ";"}], " "}]}], "Input",
 CellChangeTimes->{{3.525112845374671*^9, 3.525112988617275*^9}, {
  3.525113459603532*^9, 3.525113472249138*^9}, {3.525113554121476*^9, 
  3.525113581131281*^9}, {3.525113780579424*^9, 3.5251137888400583`*^9}, {
  3.525113825010914*^9, 3.525113825305956*^9}, {3.525204881040271*^9, 
  3.525204882117687*^9}, {3.525205322777459*^9, 3.525205343300995*^9}, {
  3.525205386747162*^9, 3.525205391547484*^9}, {3.526492369515942*^9, 
  3.526492416380603*^9}}],

Cell[CellGroupData[{

Cell["Test Vectors for mstep", "Subsubsection",
 CellChangeTimes->{{3.50401932583255*^9, 3.504019328703233*^9}, {
  3.504185890254962*^9, 3.504185890709035*^9}, {3.5042036574835863`*^9, 
  3.504203657569166*^9}, {3.504916768505199*^9, 3.504916769023423*^9}, {
  3.5264122361917953`*^9, 3.526412241984367*^9}, {3.526498353607053*^9, 
  3.526498354044754*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"Clear", "[", "nworkers", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"nworkers", " ", "=", " ", "4"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Clear", "[", "nlabels", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"nlabels", " ", "=", " ", "5"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Clear", "[", "nratings", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"nratings", " ", "=", " ", "8"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"{", " ", 
    RowBox[{
     RowBox[{
      RowBox[{
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"ListQ", "[", "#", "]"}], " ", "&&", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"!", " ", 
             RowBox[{"ListQ", "[", 
              RowBox[{"#", "[", 
               RowBox[{"[", "1", "]"}], "]"}], "]"}]}], " ", "||", " ", 
            RowBox[{"!", " ", 
             RowBox[{"IntegerQ", "[", 
              RowBox[{
               RowBox[{"#", "[", 
                RowBox[{"[", "1", "]"}], "]"}], "[", 
               RowBox[{"[", "1", "]"}], "]"}], "]"}]}]}], ")"}]}], ",", " ", 
         RowBox[{"Flatten", "[", "#", "]"}], ",", " ", "#"}], "]"}], "&"}], 
      " ", "/@", " ", "#"}], ",", " ", "\[IndentingNewLine]", 
     RowBox[{"mstep", "[", "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{"#", "[", 
        RowBox[{"[", "1", "]"}], "]"}], ",", " ", 
       RowBox[{"(*", " ", "\[Kappa]", " ", "*)"}], "\[IndentingNewLine]", 
       RowBox[{"#", "[", 
        RowBox[{"[", "2", "]"}], "]"}], ",", " ", 
       RowBox[{"(*", " ", "log\[Alpha]", " ", "*)"}], "\[IndentingNewLine]", 
       RowBox[{"Table", "[", 
        RowBox[{
         RowBox[{"Table", "[", 
          RowBox[{
           RowBox[{"j", "  ", "-", " ", "0.5", " ", "+", " ", 
            RowBox[{
             RowBox[{
              RowBox[{"#", "[", 
               RowBox[{"[", "3", "]"}], "]"}], "[", 
              RowBox[{"[", "k", "]"}], "]"}], "[", 
             RowBox[{"[", "j", "]"}], "]"}]}], ",", 
           RowBox[{"{", " ", 
            RowBox[{"j", ",", " ", "1", ",", " ", 
             RowBox[{"Length", "[", 
              RowBox[{
               RowBox[{"#", "[", 
                RowBox[{"[", "3", "]"}], "]"}], "[", 
               RowBox[{"[", "k", "]"}], "]"}], "]"}]}], "}"}]}], "]"}], ",", 
         " ", 
         RowBox[{"{", " ", 
          RowBox[{"k", ",", " ", "1", ",", " ", 
           RowBox[{"Length", "[", 
            RowBox[{"#", "[", 
             RowBox[{"[", "3", "]"}], "]"}], "]"}]}], "}"}]}], "]"}], ",", 
       RowBox[{"(*", " ", "\[Tau]", " ", "*)"}], "\[IndentingNewLine]", 
       RowBox[{"#", "[", 
        RowBox[{"[", "4", "]"}], "]"}], ",", " ", 
       RowBox[{"(*", " ", "log\[Lambda]", " ", "*)"}], "\[IndentingNewLine]", 
       
       RowBox[{"#", "[", 
        RowBox[{"[", "5", "]"}], "]"}], ",", " ", 
       RowBox[{"(*", " ", "pz", " ", "*)"}], "\[IndentingNewLine]", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"{", 
           RowBox[{
            RowBox[{"1", "+", 
             RowBox[{"#", "[", 
              RowBox[{"[", "1", "]"}], "]"}]}], ",", 
            RowBox[{"#", "[", 
             RowBox[{"[", "2", "]"}], "]"}]}], "}"}], "&"}], " ", "/@", " ", 
         RowBox[{"#", "[", 
          RowBox[{"[", "6", "]"}], "]"}]}], ")"}], ",", " ", 
       RowBox[{"(*", " ", "d", " ", "*)"}], 
       RowBox[{"Function", "[", 
        RowBox[{"x", ",", " ", 
         RowBox[{"NormalDistribution", "[", 
          RowBox[{"x", ",", " ", 
           RowBox[{"#", "[", 
            RowBox[{"[", "7", "]"}], "]"}]}], "]"}]}], "]"}]}], " ", 
      RowBox[{"(*", " ", "plog\[Alpha]", " ", "*)"}], "\[IndentingNewLine]", 
      "]"}]}], "\[IndentingNewLine]", "}"}], "&"}], "/@", 
  "\[IndentingNewLine]", 
  RowBox[{"Table", "[", 
   RowBox[{
    RowBox[{"{", " ", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"Random", "[", "]"}], ",", " ", 
      RowBox[{"(*", " ", "\[Kappa]", " ", "*)"}], "\[IndentingNewLine]", 
      RowBox[{"Random", "[", "]"}], ",", " ", 
      RowBox[{"(*", " ", "log\[Alpha]", " ", "*)"}], "\[IndentingNewLine]", 
      RowBox[{"Table", "[", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"Random", "[", "]"}], ",", " ", 
          RowBox[{"{", " ", 
           RowBox[{"i", ",", " ", "1", ",", " ", 
            RowBox[{"nlabels", " ", "-", " ", "1"}]}], "}"}]}], "]"}], ",", 
        " ", 
        RowBox[{"{", " ", 
         RowBox[{"k", ",", " ", "1", ",", " ", "nworkers"}], "}"}]}], "]"}], 
      ",", " ", 
      RowBox[{"(*", " ", "\[Tau]", " ", "*)"}], "\[IndentingNewLine]", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{"Random", "[", "]"}], ",", " ", 
        RowBox[{"{", " ", 
         RowBox[{"i", ",", " ", "1", ",", " ", "nworkers"}], " ", "}"}]}], 
       "]"}], ",", " ", 
      RowBox[{"(*", " ", "log\[Lambda]", " ", "*)"}], "\[IndentingNewLine]", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{"Random", "[", "]"}], ",", " ", 
        RowBox[{"{", " ", 
         RowBox[{"i", ",", " ", "1", ",", " ", "nlabels"}], " ", "}"}]}], 
       "]"}], ",", " ", 
      RowBox[{"(*", " ", "pz", " ", "*)"}], "\[IndentingNewLine]", 
      RowBox[{"Table", "[", 
       RowBox[{
        RowBox[{"{", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"Random", "[", 
           RowBox[{"Integer", ",", " ", 
            RowBox[{"nworkers", " ", "-", " ", "1"}]}], "]"}], ",", 
          "\[IndentingNewLine]", 
          RowBox[{"Random", "[", 
           RowBox[{"Integer", ",", " ", 
            RowBox[{"nlabels", " ", "-", " ", "1"}]}], "]"}]}], 
         "\[IndentingNewLine]", "}"}], ",", " ", 
        RowBox[{"{", " ", 
         RowBox[{"i", ",", " ", "1", ",", " ", "nratings"}], " ", "}"}]}], 
       "]"}], ",", " ", 
      RowBox[{"(*", " ", "d", " ", "*)"}], "\[IndentingNewLine]", 
      RowBox[{"Random", "[", "]"}]}], " ", 
     RowBox[{"(*", " ", 
      RowBox[{"plog\[Alpha]", " ", "stddev"}], " ", "*)"}], 
     "\[IndentingNewLine]", "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{"{", " ", 
     RowBox[{"foo", ",", " ", "1", ",", " ", "10"}], " ", "}"}]}], 
   "]"}]}]}], "Input",
 CellChangeTimes->{{3.504016424813343*^9, 3.504016580297758*^9}, {
   3.504018269599441*^9, 3.504018279219314*^9}, {3.504018359153508*^9, 
   3.504018387475568*^9}, {3.5040184327040863`*^9, 3.504018509500141*^9}, {
   3.504018861653284*^9, 3.504018920277594*^9}, {3.504019049785894*^9, 
   3.504019065803638*^9}, 3.504019184180941*^9, {3.504059801963703*^9, 
   3.504059813764331*^9}, 3.5040599982883453`*^9, {3.504060100407703*^9, 
   3.504060104803857*^9}, 3.504060440796597*^9, {3.504060503267675*^9, 
   3.504060525182757*^9}, {3.50456047953319*^9, 3.504560681387557*^9}, {
   3.504577463729417*^9, 3.504577464011519*^9}, {3.504577589051256*^9, 
   3.504577590132493*^9}, {3.504577632742776*^9, 3.5045776330605373`*^9}, {
   3.504740502012248*^9, 3.504740503922497*^9}, {3.504740727150861*^9, 
   3.504740736352736*^9}, 3.504876469621917*^9, {3.5055962008030443`*^9, 
   3.505596275077857*^9}, {3.505596319880871*^9, 3.505596373226162*^9}, {
   3.505596415459552*^9, 3.505596505766666*^9}, {3.50559654044011*^9, 
   3.505596540734797*^9}, 3.505672802683957*^9, 3.5056942774993753`*^9, {
   3.505694366620678*^9, 3.505694366726482*^9}, {3.5057600362594757`*^9, 
   3.5057600462592773`*^9}, 3.505760218072028*^9, {3.5057618784831467`*^9, 
   3.5057618855096197`*^9}, {3.505765314690784*^9, 3.505765460997046*^9}, {
   3.505765519815023*^9, 3.505765560295491*^9}, 3.505765708877458*^9, {
   3.5059422297177*^9, 3.50594224933794*^9}, {3.5059422915411587`*^9, 
   3.5059423868650618`*^9}, {3.505942419849204*^9, 3.505942458271961*^9}, 
   3.506003797955632*^9, 3.522544655482306*^9, 3.522544695510792*^9, {
   3.526412258232821*^9, 3.5264124297647047`*^9}, {3.526412534152213*^9, 
   3.526412549418888*^9}, {3.526412580963234*^9, 3.526412612442492*^9}, {
   3.52641284537436*^9, 3.526412862526091*^9}, {3.526412977275703*^9, 
   3.526412977409284*^9}, {3.5264130300128517`*^9, 3.526413071567891*^9}, {
   3.5264131895823917`*^9, 3.5264131965298567`*^9}, {3.5264133128542147`*^9, 
   3.526413315530311*^9}, {3.526413392188962*^9, 3.5264134345921392`*^9}, {
   3.526413727365831*^9, 3.526413730697576*^9}, {3.52641407631104*^9, 
   3.526414085568967*^9}, 3.526430667444561*^9, 3.52643074409554*^9, {
   3.526492438757979*^9, 3.526492455159773*^9}, 3.52649809101746*^9, 
   3.527038979383321*^9, 3.527109299611863*^9, 3.527109342966633*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"FindMaximum", "::", "\<\"precw\"\>"}], 
  RowBox[{
  ":", " "}], "\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"The precision of the \
argument function (\\\\\\\"\\\", \
\\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\!\\(-\\(\\((\\(\\(1.\
211616050953213` \[InvisibleSpace]\\)\\) + \
\\(\\(Log[\\(\\(0.7506078515464795`\\\\ \
\[ExponentialE]\\^\\(\\(\\(-1.770011461340255`\\)\\)\\\\ \\(Plus[\\(\\(\
\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\^2\\)\\)\\)]\\)\\) + \\(\\(\
\[LeftSkeleton] 29 \[RightSkeleton]\\)\\) + \\(\\(0.3774354904659957`\\\\ \\(\
\\(Log[\\(\\(\[ExponentialE]\\^\\(14.795939529349411`\\\\ \\(\\(Power[\\(\\(\
\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\)\\)\\/\\(1 + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\) + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\) + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\) + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \
\[RightSkeleton]\\)\\)]\\)\\)\\)\\)\\)]\\)\\)\\)\\))\\)\\)\\), \\\"MT\\\"]\\)\
\[NoBreak]\\!\\(\\*StyleBox[\\\"\\\\\\\") is less than WorkingPrecision (\\\\\
\\\"\\\", \\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\!\\(20.`\\), \
\\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\\"\\\\\\\").\\\\\\\"\\\", \
\\\"MT\\\"]\\) \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/precw\\\", ButtonNote -> \
\\\"FindMaximum::precw\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{{3.526492456759232*^9, 3.526492503457635*^9}, 
   3.5264980914682083`*^9, 3.527038983908208*^9, 3.52710929994071*^9, 
   3.527109343358431*^9, 3.52711234213334*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"FindMaximum", "::", "\<\"precw\"\>"}], 
  RowBox[{
  ":", " "}], "\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"The precision of the \
argument function (\\\\\\\"\\\", \
\\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\!\\(-\\(\\((\\(\\(1.\
5717177362051382` \[InvisibleSpace]\\)\\) + \
\\(\\(Log[\\(\\(0.41661847475093433`\\\\ \
\[ExponentialE]\\^\\(\\(\\(-0.5452892324040975`\\)\\)\\\\ \\(Plus[\\(\\(\
\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\^2\\)\\)\\)]\\)\\) + \\(\\(\
\[LeftSkeleton] 39 \[RightSkeleton]\\)\\) + \\(\\(0.6807839638848686`\\\\ \\(\
\\(Log[\\(\\(\[ExponentialE]\\^\\(16.701198358619987`\\\\ \\(\\(Power[\\(\\(\
\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\)\\)\\/\\(1 + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\) + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\) + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\) + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \
\[RightSkeleton]\\)\\)]\\)\\)\\)\\)\\)]\\)\\)\\)\\))\\)\\)\\), \\\"MT\\\"]\\)\
\[NoBreak]\\!\\(\\*StyleBox[\\\"\\\\\\\") is less than WorkingPrecision (\\\\\
\\\"\\\", \\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\!\\(20.`\\), \
\\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\\"\\\\\\\").\\\\\\\"\\\", \
\\\"MT\\\"]\\) \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/precw\\\", ButtonNote -> \
\\\"FindMaximum::precw\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{{3.526492456759232*^9, 3.526492503457635*^9}, 
   3.5264980914682083`*^9, 3.527038983908208*^9, 3.52710929994071*^9, 
   3.527109343358431*^9, 3.527112342193737*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"FindMaximum", "::", "\<\"precw\"\>"}], 
  RowBox[{
  ":", " "}], "\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"The precision of the \
argument function (\\\\\\\"\\\", \
\\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\!\\(-\\(\\((\\(\\(1.\
2733728989726854` \[InvisibleSpace]\\)\\) + \
\\(\\(Log[\\(\\(16.66959484739793`\\\\ \
\[ExponentialE]\\^\\(\\(\\(-872.9712913030656`\\)\\)\\\\ \\(Plus[\\(\\(\
\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\^2\\)\\)\\)]\\)\\) + \\(\\(\
\[LeftSkeleton] 34 \[RightSkeleton]\\)\\) + \\(\\(0.07883306716775658`\\\\ \
\\(\\(Log[\\(\\(\[ExponentialE]\\^\\(16.251494541228602`\\\\ \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\)\\)\\/\\(1 + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\) + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\) + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\) + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \
\[RightSkeleton]\\)\\)]\\)\\)\\)\\)\\)]\\)\\)\\)\\))\\)\\)\\), \\\"MT\\\"]\\)\
\[NoBreak]\\!\\(\\*StyleBox[\\\"\\\\\\\") is less than WorkingPrecision (\\\\\
\\\"\\\", \\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\!\\(20.`\\), \
\\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\\"\\\\\\\").\\\\\\\"\\\", \
\\\"MT\\\"]\\) \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/precw\\\", ButtonNote -> \
\\\"FindMaximum::precw\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{{3.526492456759232*^9, 3.526492503457635*^9}, 
   3.5264980914682083`*^9, 3.527038983908208*^9, 3.52710929994071*^9, 
   3.527109343358431*^9, 3.527112342284975*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"General", "::", "\<\"stop\"\>"}], 
  RowBox[{
  ":", " "}], "\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Further output of \\\\\\\"\\\
\", \\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\!\\(FindMaximum :: \
\\\"precw\\\"\\), \\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\\"\\\\\\\" will \
be suppressed during this calculation.\\\\\\\"\\\", \\\"MT\\\"]\\) \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/stop\\\", \
ButtonNote -> \\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{{3.526492456759232*^9, 3.526492503457635*^9}, 
   3.5264980914682083`*^9, 3.527038983908208*^9, 3.52710929994071*^9, 
   3.527109343358431*^9, 3.527112342310625*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.05821375404107683`", ",", "0.46807962338189735`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.6518323553831725`", ",", "0.4730402022069297`", ",", 
         "0.6541257212397826`", ",", "0.02168618195941578`", ",", 
         "0.8201110549992193`", ",", "0.10125426453194095`", ",", 
         "0.3407561775675689`", ",", "0.06727645894198404`", ",", 
         "0.05417345674898048`", ",", "0.42738451755279716`", ",", 
         "0.03249732955680193`", ",", "0.6437892780473274`", ",", 
         "0.7612320346065158`", ",", "0.21530584264139746`", ",", 
         "0.3280762791704677`", ",", "0.7562063409586625`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.09710720844447121`", ",", "0.8637126459380744`", ",", 
         "0.3165104417326932`", ",", "0.8035202276268496`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.029267845849168223`", ",", "0.004532484867563853`", ",", 
         "0.2582966876916164`", ",", "0.3354406042449523`", ",", 
         "0.3774354904659957`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "4"}], "}"}]}], "}"}], ",", 
       "0.5314922826606341`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "17.51929582720520899679668821392419860126`20."}], ",", 
       RowBox[{
       "-", "1.1503294729550958019964027769966468696394290560647277743556`20.\
"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.6041709664518338`", ",", "0.3137544222855365`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.5573244354667763`", ",", "0.43023801812869317`", ",", 
         "0.26341478888426495`", ",", "0.2464779633435525`", ",", 
         "0.5031509787177959`", ",", "0.002853500575896008`", ",", 
         "0.23091745932746302`", ",", "0.6026886852962251`", ",", 
         "0.7419189441112801`", ",", "0.7875476579344985`", ",", 
         "0.9028411801569953`", ",", "0.8464823443375625`", ",", 
         "0.6448117356668089`", ",", "0.9238350119964241`", ",", 
         "0.5863307384243021`", ",", "0.042962116710712914`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.6155438898176407`", ",", "0.9193025271288603`", ",", 
         "0.32803405073268566`", ",", "0.7075215124657606`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.238108399351645`", ",", "0.3878102444682262`", ",", 
         "0.7238630842808519`", ",", "0.39376709018022404`", ",", 
         "0.6807839638848686`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "2"}], "}"}]}], "}"}], ",", 
       "0.957572226339533`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "37.17986594355134167251419325950024427916`20."}], ",", 
       RowBox[{
       "-", "2.2983501638432758764905141853673323375814412095063943297646`20.\
"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.46044829539658694`", ",", "0.14728912683667156`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.17763298516707274`", ",", "0.954718725763637`", ",", 
         "0.22953083606912392`", ",", "0.5446004415404465`", ",", 
         "0.4357140410557926`", ",", "0.1671710678291385`", ",", 
         "0.3266896559121286`", ",", "0.698118097202884`", ",", 
         "0.7909023053889837`", ",", "0.24333605583271428`", ",", 
         "0.7403589174878266`", ",", "0.655155980492171`", ",", 
         "0.17535841557134296`", ",", "0.324033528703854`", ",", 
         "0.41232486675514085`", ",", "0.9476344680264105`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.937250016219698`", ",", "0.9362232842356277`", ",", 
         "0.688461782474289`", ",", "0.5538673778461863`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.25646605233482933`", ",", "0.9786510578960947`", ",", 
         "0.22801348707770205`", ",", "0.40657825100951483`", ",", 
         "0.07883306716775658`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"2", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "2"}], "}"}]}], "}"}], ",", 
       "0.023932332132457695`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "149.3913169378593447312158325007348555803`20."}], ",", 
       "0.3817267715750242346005917990189700206613660979360069802624`20."}], 
      "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.9984826510085781`", ",", "0.8619778094690683`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.643119026111964`", ",", "0.8567612643033192`", ",", 
         "0.6717929950964495`", ",", "0.1638597122661844`", ",", 
         "0.8522167207229803`", ",", "0.6134252084706049`", ",", 
         "0.931434077608623`", ",", "0.5087037317740134`", ",", 
         "0.6768583051516374`", ",", "0.28939167976675095`", ",", 
         "0.5191092108534822`", ",", "0.5610692637476029`", ",", 
         "0.7396082889319394`", ",", "0.3531683955311232`", ",", 
         "0.8306474283791931`", ",", "0.007201885901416533`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.48314223659711003`", ",", "0.3745173376350285`", ",", 
         "0.6026339413014912`", ",", "0.6006236348919017`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.40430916942935347`", ",", "0.35058500550257077`", ",", 
         "0.604151290292913`", ",", "0.7386458254228333`", ",", 
         "0.7611901433173894`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"2", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}]}], "}"}], ",", 
       "0.4938237411992516`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "51.37098947677516055693415664910161874795`20."}], ",", 
       RowBox[{
       "-", "1.3306325324662280197983487831760951105333724495127789566595`20.\
"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.9323582951964634`", ",", "0.574786113156649`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.9089734225944092`", ",", "0.8803985327286467`", ",", 
         "0.0009242175878404564`", ",", "0.06608238138263559`", ",", 
         "0.23211511744277183`", ",", "0.5910068529618957`", ",", 
         "0.4818150067343583`", ",", "0.5050131176350326`", ",", 
         "0.49250682851083244`", ",", "0.2378384574307725`", ",", 
         "0.6511675783551651`", ",", "0.49781123173361613`", ",", 
         "0.009364591913722412`", ",", "0.863321119795744`", ",", 
         "0.04853363705367401`", ",", "0.8971875968417145`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.6050554224843689`", ",", "0.5127361142931732`", ",", 
         "0.44438234676076105`", ",", "0.15854177141888107`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.8438652791669795`", ",", "0.01891237309392165`", ",", 
         "0.5120240515642975`", ",", "0.5837556582622321`", ",", 
         "0.9348918565725702`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"3", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "1"}], "}"}]}], "}"}], ",", 
       "0.138513840365275`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "106.13496232850602594383501271122006604946`20."}], ",", 
       RowBox[{
       "-", "0.1422727731197985679847534013850863902905796720688158529811`20.\
"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.5110998339764571`", ",", "0.5176732768795965`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.7027767391297984`", ",", "0.5475069874033793`", ",", 
         "0.029284827242098802`", ",", "0.012660159244563901`", ",", 
         "0.210269910618966`", ",", "0.3096685299726068`", ",", 
         "0.37811724888693365`", ",", "0.5148489275109478`", ",", 
         "0.20090531870524359`", ",", "0.4463474101768628`", ",", 
         "0.3295836118332597`", ",", "0.6176613306692333`", ",", 
         "0.5958498962208746`", ",", "0.9336112958836895`", ",", 
         "0.8852012650724986`", ",", "0.45911955925035225`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.7519846170538952`", ",", "0.9146989227897679`", ",", 
         "0.37317721350820104`", ",", "0.8753639009881201`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.8170927604813248`", ",", "0.7761850824244929`", ",", 
         "0.8620773795317439`", ",", "0.3576906241085236`", ",", 
         "0.11431602135152644`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "0"}], "}"}]}], "}"}], ",", 
       "0.2286780950211136`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "64.65488057198343365577672823729322363121`20."}], ",", 
       RowBox[{
       "-", "0.7774476088986907750010534866763738045594147544475882583015`20.\
"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.8327925522896451`", ",", "0.34503046486395966`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.9040461107325605`", ",", "0.9190095650485068`", ",", 
         "0.4546753034027115`", ",", "0.8301815373530119`", ",", 
         "0.7031407920273169`", ",", "0.47266215487164404`", ",", 
         "0.12509169156945182`", ",", "0.21252020668377855`", ",", 
         "0.10729089580644226`", ",", "0.5390508589879545`", ",", 
         "0.2398904264969532`", ",", "0.7534006474334263`", ",", 
         "0.3553062787525471`", ",", "0.6243519361981865`", ",", 
         "0.8667132129887521`", ",", "0.8780367464453062`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.5382135182712222`", ",", "0.8481668537736936`", ",", 
         "0.004635833457008177`", ",", "0.5203461223367826`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.42389749691969575`", ",", "0.61948875875258`", ",", 
         "0.17184328116736303`", ",", "0.17531565747282285`", ",", 
         "0.5198513861871353`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"1", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "4"}], "}"}]}], "}"}], ",", 
       "0.7004791937040732`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "34.62661207695958646005079739372632763235`20."}], ",", 
       RowBox[{
       "-", "1.9024007359987113118925882036790018927237180118572368314744`20.\
"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.7171679777646516`", ",", "0.3451341201198109`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.8167105941598184`", ",", "0.2278170388324292`", ",", 
         "0.5920762861951997`", ",", "0.1326139134360324`", ",", 
         "0.7094196983533761`", ",", "0.6887661798444747`", ",", 
         "0.3521858596982465`", ",", "0.37921326600260613`", ",", 
         "0.3541134196008291`", ",", "0.0644142436462882`", ",", 
         "0.4854726467094944`", ",", "0.5011765195573`", ",", 
         "0.8158999013296069`", ",", "0.21624738987259454`", ",", 
         "0.48083681325248623`", ",", "0.9808303972205175`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.3920024044099111`", ",", "0.5967586311200145`", ",", 
         "0.3089935320851232`", ",", "0.8055147397476946`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.8721510182227757`", ",", "0.8962794374159413`", ",", 
         "0.5918255543204717`", ",", "0.4603806196278836`", ",", 
         "0.05544042406295736`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"2", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "1"}], "}"}]}], "}"}], ",", 
       "0.6684623985835121`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "42.65670190151519456950932408421705769984`20."}], ",", 
       RowBox[{
       "-", "1.5356808168417184298235757807261632305884102578374950098805`20.\
"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.9997492681252719`", ",", "0.3277667061918512`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.3460207257095812`", ",", "0.9796962187390373`", ",", 
         "0.6475634084270254`", ",", "0.9485534401892451`", ",", 
         "0.9919073061087521`", ",", "0.9152819750927491`", ",", 
         "0.162090761717531`", ",", "0.4473769206319451`", ",", 
         "0.17600740477914525`", ",", "0.6990345852201546`", ",", 
         "0.6812539484650447`", ",", "0.46654652341142766`", ",", 
         "0.7840050003692342`", ",", "0.10227595410014005`", ",", 
         "0.3722604163799216`", ",", "0.661031783663733`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.9118539821464584`", ",", "0.20599651668419877`", ",", 
         "0.7804348620594499`", ",", "0.2006511640358494`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.8564135580835011`", ",", "0.5375341181006867`", ",", 
         "0.780685593934178`", ",", "0.8728844578439982`", ",", 
         "0.5103928323739199`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"1", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "4"}], "}"}]}], "}"}], ",", 
       "0.5578378993616494`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "60.66175698772882737597411153936118384849`20."}], ",", 
       RowBox[{
       "-", "1.6020699932411985382121987586911916398579869280638376949355`20.\
"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.1331221855071526`", ",", "0.924331017654753`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.5184855262651678`", ",", "0.6425559242689003`", ",", 
         "0.9710314237896216`", ",", "0.47695409702280794`", ",", 
         "0.34247812148602247`", ",", "0.9435213390487458`", ",", 
         "0.2897774753245768`", ",", "0.0104075736113803`", ",", 
         "0.5584731211167883`", ",", "0.8412453849486058`", ",", 
         "0.9175170589446553`", ",", "0.34937578994764723`", ",", 
         "0.6466191389703299`", ",", "0.635248868264407`", ",", 
         "0.13708219688520532`", ",", "0.14872462591179786`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.7902055808868288`", ",", "0.09771475016372022`", ",", 
         "0.3563966029510273`", ",", "0.2758401680677997`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.279812748512909`", ",", "0.5398768508020708`", ",", 
         "0.2232744174438747`", ",", "0.35150915041304664`", ",", 
         "0.7613272222477413`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"1", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "4"}], "}"}]}], "}"}], ",", 
       "0.8973209265331704`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "31.98410581620924352486885688411607503209`20."}], ",", 
       RowBox[{
       "-", "2.1589694916016017478565300961090085880844657850730072823353`20.\
"}]}], "}"}]}], "}"}]}], "}"}]], "Output",
 CellChangeTimes->{{3.526492456857325*^9, 3.526492503498892*^9}, 
   3.526498092225068*^9, 3.527038984749168*^9, 3.5271092999707727`*^9, 
   3.527109343600089*^9, 3.527112342895496*^9}]
}, Open  ]]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["EMstep (log\[Alpha] and q)", "Subsection",
 CellChangeTimes->{{3.525095319326301*^9, 3.525095320059371*^9}, {
  3.52509801721535*^9, 3.525098017925005*^9}, {3.525112791223256*^9, 
  3.525112791828678*^9}, {3.525115293972691*^9, 3.525115296179682*^9}, {
  3.5251184948850317`*^9, 3.5251184992621593`*^9}, {3.526500226633251*^9, 
  3.526500228325598*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"Clear", "[", "emsteponce", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"emsteponce", "[", 
    RowBox[{
    "\[Kappa]_", ",", " ", "log\[Alpha]_", ",", " ", "\[Tau]_", ",", " ", 
     "log\[Lambda]_", ",", " ", "logpriorz_", ",", " ", "clamp_", ",", " ", 
     "d_", ",", " ", "plog\[Alpha]_"}], "]"}], " ", ":=", " ", 
   RowBox[{"Module", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"q", ",", " ", "pznew", ",", " ", "log\[Alpha]new"}], "}"}], 
     ",", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"pznew", " ", "=", " ", 
       RowBox[{"estep", "[", 
        RowBox[{
        "logpriorz", ",", " ", "d", ",", " ", "log\[Alpha]", ",", " ", 
         "log\[Lambda]", ",", " ", "\[Tau]", ",", " ", "clamp"}], "]"}]}], 
      ";", "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{"{", " ", 
        RowBox[{"q", ",", " ", "log\[Alpha]new"}], " ", "}"}], " ", "=", " ", 
       
       RowBox[{"mstep", "[", 
        RowBox[{
        "\[Kappa]", ",", " ", "log\[Alpha]", ",", " ", "\[Tau]", ",", " ", 
         "log\[Lambda]", ",", " ", "pznew", ",", "d", ",", " ", 
         "plog\[Alpha]"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"{", " ", 
       RowBox[{"q", ",", " ", "pznew", ",", " ", "log\[Alpha]new"}], " ", 
       "}"}]}]}], "\[IndentingNewLine]", "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Clear", "[", "emstepf", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"emstepf", "[", "tuple_", "]"}], " ", ":=", " ", 
   RowBox[{"Module", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "q", ",", " ", "\[Kappa]", ",", " ", "log\[Alpha]", ",", " ", "\[Tau]", 
       ",", " ", "log\[Lambda]", ",", " ", "pz", ",", "logpriorz", ",", " ", 
       "clamp", ",", " ", "d", ",", " ", "plog\[Alpha]", ",", " ", "qnew", 
       ",", " ", "pznew", ",", " ", "log\[Alpha]new"}], "}"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{
       RowBox[{"{", " ", 
        RowBox[{
        "q", ",", " ", "\[Kappa]", ",", " ", "log\[Alpha]", ",", " ", 
         "\[Tau]", ",", " ", "log\[Lambda]", ",", " ", "pz", ",", "logpriorz",
          ",", " ", "clamp", ",", " ", "d", ",", " ", "plog\[Alpha]"}], " ", 
        "}"}], " ", "=", " ", "tuple"}], ";", "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{"{", " ", 
        RowBox[{"qnew", ",", " ", "pznew", ",", " ", "log\[Alpha]new"}], " ", 
        "}"}], " ", "=", " ", 
       RowBox[{"emsteponce", "[", 
        RowBox[{
        "\[Kappa]", ",", " ", "log\[Alpha]", ",", " ", "\[Tau]", ",", " ", 
         "log\[Lambda]", ",", " ", "logpriorz", ",", " ", "clamp", ",", " ", 
         "d", ",", " ", "plog\[Alpha]"}], "]"}]}], ";", "\[IndentingNewLine]", 
      RowBox[{"{", " ", 
       RowBox[{
       "qnew", ",", "\[Kappa]", ",", " ", "log\[Alpha]new", ",", " ", 
        "\[Tau]", ",", " ", "log\[Lambda]", ",", " ", "pznew", ",", 
        "logpriorz", ",", " ", "clamp", ",", " ", "d", ",", " ", 
        "plog\[Alpha]"}], " ", "}"}]}]}], " ", "\[IndentingNewLine]", "]"}]}],
   ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Clear", "[", "emstep", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"emstep", "[", 
   RowBox[{
   "tol_", ",", " ", "\[Kappa]_", ",", " ", "log\[Alpha]_", ",", " ", 
    "\[Tau]_", ",", " ", "log\[Lambda]_", ",", " ", "priorz_", ",", " ", 
    "clamp_", ",", " ", "d_", ",", " ", "plog\[Alpha]_"}], "]"}], ":=", " ", 
  RowBox[{
   RowBox[{"FixedPoint", "[", 
    RowBox[{"emstepf", ",", " ", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "100"}], ",", "  ", "\[Kappa]", ",", " ", "log\[Alpha]", 
       ",", " ", "\[Tau]", ",", " ", "log\[Lambda]", ",", " ", "priorz", ",", 
       
       RowBox[{"Log", "[", "priorz", "]"}], ",", " ", "clamp", ",", " ", "d", 
       ",", " ", "plog\[Alpha]"}], "}"}], ",", 
     RowBox[{"SameTest", "\[Rule]", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"Abs", "[", 
          RowBox[{
           RowBox[{"#1", "[", 
            RowBox[{"[", "1", "]"}], "]"}], " ", "-", " ", 
           RowBox[{"#2", "[", 
            RowBox[{"[", "1", "]"}], "]"}]}], "]"}], " ", "<", " ", 
         RowBox[{"tol", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"Abs", "[", 
             RowBox[{"#1", "[", 
              RowBox[{"[", "1", "]"}], "]"}], "]"}], " ", "+", " ", 
            RowBox[{"Abs", "[", 
             RowBox[{"#2", "[", 
              RowBox[{"[", "1", "]"}], "]"}], "]"}]}], ")"}]}]}], "&"}], 
       ")"}]}]}], "]"}], " ", "//", " ", 
   RowBox[{
    RowBox[{"{", " ", 
     RowBox[{
      RowBox[{"#", "[", 
       RowBox[{"[", "1", "]"}], "]"}], ",", " ", 
      RowBox[{"#", "[", 
       RowBox[{"[", "3", "]"}], "]"}], ",", " ", 
      RowBox[{"#", "[", 
       RowBox[{"[", "6", "]"}], "]"}]}], "}"}], "&"}]}]}]}], "Input",
 CellChangeTimes->{{3.525118502664279*^9, 3.5251189229771748`*^9}, {
   3.525118971729904*^9, 3.52511906365032*^9}, 3.525119216489663*^9, {
   3.52511927699596*^9, 3.525119385656954*^9}, {3.5251194234202023`*^9, 
   3.5251194314497128`*^9}, {3.525119463132557*^9, 3.525119463482739*^9}, {
   3.525119510764413*^9, 3.525119696006434*^9}, {3.52511973278708*^9, 
   3.5251198264569597`*^9}, {3.5251198791493273`*^9, 3.525119881275783*^9}, {
   3.525119955256009*^9, 3.525119993679954*^9}, {3.5265002695455008`*^9, 
   3.526500332941578*^9}, {3.526500369666182*^9, 3.52650042405199*^9}, {
   3.5265004724341307`*^9, 3.526500587699682*^9}, {3.526502847654395*^9, 
   3.526502954109222*^9}, {3.526503215230756*^9, 3.526503276460854*^9}, {
   3.526503308082038*^9, 3.5265033119789867`*^9}, 3.5265036313778563`*^9, {
   3.5265037073986053`*^9, 3.526503707695611*^9}, {3.526503973769458*^9, 
   3.526503977301149*^9}, {3.526504637767449*^9, 3.526504638421287*^9}, {
   3.527039060079911*^9, 3.5270390876971693`*^9}, {3.527039147677495*^9, 
   3.527039177669166*^9}, {3.527039212404153*^9, 3.52703921289738*^9}, {
   3.527039345254841*^9, 3.527039364458366*^9}}],

Cell[CellGroupData[{

Cell["Test Vectors for EMstep", "Subsubsection",
 CellChangeTimes->{{3.50401932583255*^9, 3.504019328703233*^9}, {
  3.504185890254962*^9, 3.504185890709035*^9}, {3.5042036574835863`*^9, 
  3.504203657569166*^9}, {3.504916768505199*^9, 3.504916769023423*^9}, {
  3.5264122361917953`*^9, 3.526412241984367*^9}, {3.526498353607053*^9, 
  3.526498354044754*^9}, {3.526503007240696*^9, 3.526503007498164*^9}}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"Clear", "[", "nworkers", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"nworkers", " ", "=", " ", "4"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Clear", "[", "nlabels", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"nlabels", " ", "=", " ", "5"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Clear", "[", "nratings", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"nratings", " ", "=", " ", "8"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"#", "[", 
      RowBox[{"[", "1", "]"}], "]"}], ",", " ", 
     RowBox[{"#", "[", 
      RowBox[{"[", "2", "]"}], "]"}]}], "}"}], "&"}], " ", "/@", 
  "\[IndentingNewLine]", 
  RowBox[{"(", 
   RowBox[{
    RowBox[{
     RowBox[{"{", " ", 
      RowBox[{
       RowBox[{
        RowBox[{
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{
            RowBox[{"ListQ", "[", "#", "]"}], " ", "&&", " ", 
            RowBox[{"(", 
             RowBox[{
              RowBox[{"!", " ", 
               RowBox[{"ListQ", "[", 
                RowBox[{"#", "[", 
                 RowBox[{"[", "1", "]"}], "]"}], "]"}]}], " ", "||", " ", 
              RowBox[{"!", " ", 
               RowBox[{"IntegerQ", "[", 
                RowBox[{
                 RowBox[{"#", "[", 
                  RowBox[{"[", "1", "]"}], "]"}], "[", 
                 RowBox[{"[", "1", "]"}], "]"}], "]"}]}]}], ")"}]}], ",", " ", 
           RowBox[{"Flatten", "[", "#", "]"}], ",", " ", "#"}], "]"}], "&"}], 
        " ", "/@", " ", "#"}], ",", " ", "\[IndentingNewLine]", 
       RowBox[{"emstep", "[", "\[IndentingNewLine]", 
        RowBox[{"0.0001", ",", 
         RowBox[{"(*", " ", "tol", " ", "*)"}], "\[IndentingNewLine]", 
         RowBox[{"#", "[", 
          RowBox[{"[", "1", "]"}], "]"}], ",", " ", 
         RowBox[{"(*", " ", "\[Kappa]", " ", "*)"}], "\[IndentingNewLine]", 
         RowBox[{"#", "[", 
          RowBox[{"[", "2", "]"}], "]"}], ",", " ", 
         RowBox[{"(*", " ", "log\[Alpha]", " ", "*)"}], "\[IndentingNewLine]", 
         RowBox[{"Table", "[", 
          RowBox[{
           RowBox[{"Table", "[", 
            RowBox[{
             RowBox[{"j", "  ", "-", " ", "0.5", " ", "+", " ", 
              RowBox[{
               RowBox[{
                RowBox[{"#", "[", 
                 RowBox[{"[", "3", "]"}], "]"}], "[", 
                RowBox[{"[", "k", "]"}], "]"}], "[", 
               RowBox[{"[", "j", "]"}], "]"}]}], ",", 
             RowBox[{"{", " ", 
              RowBox[{"j", ",", " ", "1", ",", " ", 
               RowBox[{"Length", "[", 
                RowBox[{
                 RowBox[{"#", "[", 
                  RowBox[{"[", "3", "]"}], "]"}], "[", 
                 RowBox[{"[", "k", "]"}], "]"}], "]"}]}], "}"}]}], "]"}], ",",
            " ", 
           RowBox[{"{", " ", 
            RowBox[{"k", ",", " ", "1", ",", " ", 
             RowBox[{"Length", "[", 
              RowBox[{"#", "[", 
               RowBox[{"[", "3", "]"}], "]"}], "]"}]}], "}"}]}], "]"}], ",", 
         RowBox[{"(*", " ", "\[Tau]", " ", "*)"}], "\[IndentingNewLine]", 
         RowBox[{"#", "[", 
          RowBox[{"[", "4", "]"}], "]"}], ",", " ", 
         RowBox[{"(*", " ", "log\[Lambda]", " ", "*)"}], 
         "\[IndentingNewLine]", 
         RowBox[{"#", "[", 
          RowBox[{"[", "5", "]"}], "]"}], ",", " ", 
         RowBox[{"(*", " ", "priorz", " ", "*)"}], "\[IndentingNewLine]", 
         RowBox[{"#", "[", 
          RowBox[{"[", "6", "]"}], "]"}], ",", " ", 
         RowBox[{"(*", " ", "clamp", " ", "*)"}], "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{
           RowBox[{"{", 
            RowBox[{
             RowBox[{"1", "+", 
              RowBox[{"#", "[", 
               RowBox[{"[", "1", "]"}], "]"}]}], ",", 
             RowBox[{"#", "[", 
              RowBox[{"[", "2", "]"}], "]"}]}], "}"}], "&"}], " ", "/@", " ", 
          
          RowBox[{"#", "[", 
           RowBox[{"[", "7", "]"}], "]"}]}], ",", " ", 
         RowBox[{"(*", " ", "d", " ", "*)"}], "\[IndentingNewLine]", 
         RowBox[{"Function", "[", 
          RowBox[{"x", ",", " ", 
           RowBox[{"NormalDistribution", "[", 
            RowBox[{"x", ",", " ", 
             RowBox[{"#", "[", 
              RowBox[{"[", "8", "]"}], "]"}]}], "]"}]}], "]"}]}], 
        RowBox[{"(*", " ", "plog\[Alpha]", " ", "*)"}], "\[IndentingNewLine]",
         "]"}]}], " ", "}"}], "&"}], " ", "/@", " ", 
    RowBox[{"Table", "[", 
     RowBox[{
      RowBox[{"{", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"Random", "[", "]"}], ",", " ", 
        RowBox[{"(*", " ", "\[Kappa]", " ", "*)"}], "\[IndentingNewLine]", 
        RowBox[{"Random", "[", "]"}], ",", " ", 
        RowBox[{"(*", " ", "log\[Alpha]", " ", "*)"}], "\[IndentingNewLine]", 
        
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"Table", "[", 
           RowBox[{
            RowBox[{"Random", "[", "]"}], ",", 
            RowBox[{"{", " ", 
             RowBox[{"j", ",", " ", "1", ",", " ", 
              RowBox[{"nlabels", " ", "-", " ", "1"}]}], "}"}]}], "]"}], ",", 
          " ", 
          RowBox[{"{", " ", 
           RowBox[{"k", ",", " ", "1", ",", " ", "nworkers"}], "}"}]}], "]"}],
         ",", " ", 
        RowBox[{"(*", " ", "\[Tau]", " ", "*)"}], "\[IndentingNewLine]", 
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"Random", "[", "]"}], ",", " ", 
          RowBox[{"{", " ", 
           RowBox[{"i", ",", " ", "1", ",", " ", "nworkers"}], " ", "}"}]}], 
         "]"}], ",", " ", 
        RowBox[{"(*", " ", "log\[Lambda]", " ", "*)"}], " ", 
        "\[IndentingNewLine]", 
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"Random", "[", "]"}], ",", " ", 
          RowBox[{"{", 
           RowBox[{"i", ",", " ", "1", ",", " ", "nlabels"}], "}"}]}], "]"}], 
        ",", " ", 
        RowBox[{"(*", " ", "priorz", " ", "*)"}], "\[IndentingNewLine]", 
        RowBox[{"If", "[", 
         RowBox[{
          RowBox[{
           RowBox[{"Random", "[", "]"}], " ", "<", " ", "0.5"}], ",", " ", 
          RowBox[{"-", "1"}], ",", " ", 
          RowBox[{"Random", "[", 
           RowBox[{"Integer", ",", " ", 
            RowBox[{"nlabels", " ", "-", " ", "1"}]}], "]"}]}], "]"}], ",", 
        " ", 
        RowBox[{"(*", " ", "clamp", " ", "*)"}], "\[IndentingNewLine]", 
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{
            RowBox[{"Random", "[", 
             RowBox[{"Integer", ",", " ", 
              RowBox[{"nworkers", " ", "-", " ", "1"}]}], "]"}], ",", 
            RowBox[{"Random", "[", 
             RowBox[{"Integer", ",", " ", 
              RowBox[{"nlabels", " ", "-", " ", "1"}]}], "]"}]}], "}"}], ",", 
          " ", 
          RowBox[{"{", " ", 
           RowBox[{"i", ",", " ", "1", ",", " ", "nratings"}], " ", "}"}]}], 
         "]"}], ",", 
        RowBox[{"(*", " ", "d", " ", "*)"}], "\[IndentingNewLine]", 
        RowBox[{"1", " ", "+", " ", 
         RowBox[{"Random", "[", "]"}]}]}], " ", 
       RowBox[{"(*", " ", 
        RowBox[{"plog\[Alpha]", " ", "stddev"}], " ", "*)"}], 
       "\[IndentingNewLine]", "}"}], ",", " ", 
      RowBox[{"{", " ", 
       RowBox[{"foo", ",", " ", "1", ",", " ", "8"}], " ", "}"}]}], "]"}]}], 
   ")"}]}]}], "Input",
 CellChangeTimes->{{3.504016424813343*^9, 3.504016580297758*^9}, {
   3.504018269599441*^9, 3.504018279219314*^9}, {3.504018359153508*^9, 
   3.504018387475568*^9}, {3.5040184327040863`*^9, 3.504018509500141*^9}, {
   3.504018861653284*^9, 3.504018920277594*^9}, {3.504019049785894*^9, 
   3.504019065803638*^9}, 3.504019184180941*^9, {3.504059801963703*^9, 
   3.504059813764331*^9}, 3.5040599982883453`*^9, {3.504060100407703*^9, 
   3.504060104803857*^9}, 3.504060440796597*^9, {3.504060503267675*^9, 
   3.504060525182757*^9}, {3.50418590618461*^9, 3.504185912579707*^9}, {
   3.504186397115213*^9, 3.5041864627493553`*^9}, {3.504187243434793*^9, 
   3.504187335384948*^9}, {3.5041877893781147`*^9, 3.504187789468603*^9}, {
   3.5042036666855288`*^9, 3.504203720287292*^9}, {3.504203761143361*^9, 
   3.5042038785987473`*^9}, 3.504204172101022*^9, {3.504204669966267*^9, 
   3.504204721532045*^9}, {3.504205201368525*^9, 3.50420520145702*^9}, {
   3.505589135463067*^9, 3.505589138197913*^9}, {3.505589410144479*^9, 
   3.505589470226988*^9}, {3.50558950031635*^9, 3.5055895318620234`*^9}, {
   3.505593036660348*^9, 3.5055930431613007`*^9}, 3.505593571277896*^9, {
   3.5055946005056257`*^9, 3.505594637819249*^9}, {3.505594708646364*^9, 
   3.5055947672213717`*^9}, 3.505594822362433*^9, 3.505694904993847*^9, 
   3.50569495400416*^9, {3.5057484466063337`*^9, 3.505748464550887*^9}, 
   3.505759963261848*^9, {3.50594173038643*^9, 3.505941756411881*^9}, 
   3.5059418679837847`*^9, {3.525989118603919*^9, 3.525989133588447*^9}, {
   3.525989176585618*^9, 3.525989329780985*^9}, {3.5259894579149*^9, 
   3.525989471950355*^9}, {3.525989581415557*^9, 3.525989585593624*^9}, {
   3.525992245973118*^9, 3.52599228203554*^9}, 3.5259939716950493`*^9, {
   3.526503028823398*^9, 3.526503036946804*^9}, {3.526503068108279*^9, 
   3.52650315070844*^9}, {3.5265033410692577`*^9, 3.526503451923143*^9}, {
   3.526503491890305*^9, 3.5265035208767567`*^9}, {3.526503821918139*^9, 
   3.526503822799163*^9}, {3.5265038549278803`*^9, 3.526503899410151*^9}, {
   3.526503945007889*^9, 3.526503965852463*^9}, {3.5265042709504747`*^9, 
   3.526504271091518*^9}, {3.526504423145095*^9, 3.526504425171175*^9}, {
   3.526504651329237*^9, 3.526504665143652*^9}, 3.526504749223894*^9, {
   3.5270392330240583`*^9, 3.527039262448041*^9}, {3.527039507778572*^9, 
   3.5270395079380283`*^9}, {3.527109406902339*^9, 3.527109406995491*^9}, {
   3.527109441502837*^9, 3.527109441793593*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"FindMaximum", "::", "\<\"precw\"\>"}], 
  RowBox[{
  ":", " "}], "\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"The precision of the \
argument function (\\\\\\\"\\\", \
\\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\!\\(-\\(\\((\\(\\(0.\
0002406806841309727` \[InvisibleSpace]\\)\\) + \
\\(\\(Log[\\(\\(0.3582820249308999`\\\\ \
\[ExponentialE]\\^\\(\\(\\(-0.40327371206582`\\)\\)\\\\ \\(Plus[\\(\\(\
\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\^2\\)\\)\\)]\\)\\) + \\(\\(\
\[LeftSkeleton] 29 \[RightSkeleton]\\)\\) + \
\\(\\(2.9168604101047036`*^-23\\\\ \
\\(\\(Log[\\(\\(\[ExponentialE]\\^\\(6.11258783107315`\\\\ \\(\\(Power[\\(\\(\
\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\)\\)\\/\\(1 + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\) + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\) + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\) + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \
\[RightSkeleton]\\)\\)]\\)\\)\\)\\)\\)]\\)\\)\\)\\))\\)\\)\\), \\\"MT\\\"]\\)\
\[NoBreak]\\!\\(\\*StyleBox[\\\"\\\\\\\") is less than WorkingPrecision (\\\\\
\\\"\\\", \\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\!\\(20.`\\), \
\\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\\"\\\\\\\").\\\\\\\"\\\", \
\\\"MT\\\"]\\) \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/precw\\\", ButtonNote -> \
\\\"FindMaximum::precw\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.526503900273711*^9, {3.5265039664914703`*^9, 3.526503979163772*^9}, 
   3.526504272558733*^9, 3.5265044273872757`*^9, {3.526504641904673*^9, 
   3.5265046757745113`*^9}, 3.5265047498122168`*^9, {3.527039235044092*^9, 
   3.527039262768598*^9}, 3.5270393741548147`*^9, 3.527039508322145*^9, 
   3.5271094072159557`*^9, 3.527109441993202*^9, 3.5271123884337673`*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"FindMaximum", "::", "\<\"precw\"\>"}], 
  RowBox[{
  ":", " "}], "\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"The precision of the \
argument function (\\\\\\\"\\\", \
\\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\!\\(-\\(\\((\\(\\(0.\
00005992293972631871` \[InvisibleSpace]\\)\\) + \
\\(\\(Log[\\(\\(0.3582820249308999`\\\\ \
\[ExponentialE]\\^\\(\\(\\(-0.40327371206582`\\)\\)\\\\ \\(Plus[\\(\\(\
\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\^2\\)\\)\\)]\\)\\) + \\(\\(\
\[LeftSkeleton] 29 \[RightSkeleton]\\)\\) + \\(\\(1.8047868454259258`*^-8\\\\ \
\\(\\(Log[\\(\\(\[ExponentialE]\\^\\(6.11258783107315`\\\\ \\(\\(Power[\\(\\(\
\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\)\\)\\/\\(1 + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\) + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\) + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\) + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \
\[RightSkeleton]\\)\\)]\\)\\)\\)\\)\\)]\\)\\)\\)\\))\\)\\)\\), \\\"MT\\\"]\\)\
\[NoBreak]\\!\\(\\*StyleBox[\\\"\\\\\\\") is less than WorkingPrecision (\\\\\
\\\"\\\", \\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\!\\(20.`\\), \
\\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\\"\\\\\\\").\\\\\\\"\\\", \
\\\"MT\\\"]\\) \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/precw\\\", ButtonNote -> \
\\\"FindMaximum::precw\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.526503900273711*^9, {3.5265039664914703`*^9, 3.526503979163772*^9}, 
   3.526504272558733*^9, 3.5265044273872757`*^9, {3.526504641904673*^9, 
   3.5265046757745113`*^9}, 3.5265047498122168`*^9, {3.527039235044092*^9, 
   3.527039262768598*^9}, 3.5270393741548147`*^9, 3.527039508322145*^9, 
   3.5271094072159557`*^9, 3.527109441993202*^9, 3.527112388509245*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"FindMaximum", "::", "\<\"precw\"\>"}], 
  RowBox[{
  ":", " "}], "\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"The precision of the \
argument function (\\\\\\\"\\\", \
\\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\!\\(-\\(\\((\\(\\(0.\
09175551047989355` \[InvisibleSpace]\\)\\) + \\(\\(\[LeftSkeleton] 30 \
\[RightSkeleton]\\)\\) + \\(\\(1.5377197490596822`*^-13\\\\ \\(\\(Log[\\(\\(\
\[ExponentialE]\\^\\(10.750690999877168`\\\\ \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\)\\)\\/\\(1 + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\) + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\) + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \[RightSkeleton]\\)\\)]\\)\\) + \
\\(\\(Power[\\(\\(\[LeftSkeleton] 2 \
\[RightSkeleton]\\)\\)]\\)\\)\\)\\)\\)]\\)\\)\\)\\))\\)\\)\\), \\\"MT\\\"]\\)\
\[NoBreak]\\!\\(\\*StyleBox[\\\"\\\\\\\") is less than WorkingPrecision (\\\\\
\\\"\\\", \\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\!\\(20.`\\), \
\\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\\"\\\\\\\").\\\\\\\"\\\", \
\\\"MT\\\"]\\) \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \
ButtonStyle->\\\"Link\\\", ButtonFrame->None, \
ButtonData:>\\\"paclet:ref/message/General/precw\\\", ButtonNote -> \
\\\"FindMaximum::precw\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.526503900273711*^9, {3.5265039664914703`*^9, 3.526503979163772*^9}, 
   3.526504272558733*^9, 3.5265044273872757`*^9, {3.526504641904673*^9, 
   3.5265046757745113`*^9}, 3.5265047498122168`*^9, {3.527039235044092*^9, 
   3.527039262768598*^9}, 3.5270393741548147`*^9, 3.527039508322145*^9, 
   3.5271094072159557`*^9, 3.527109441993202*^9, 3.527112388604315*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"General", "::", "\<\"stop\"\>"}], 
  RowBox[{
  ":", " "}], "\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Further output of \\\\\\\"\\\
\", \\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\!\\(FindMaximum :: \
\\\"precw\\\"\\), \\\"MT\\\"]\\)\[NoBreak]\\!\\(\\*StyleBox[\\\"\\\\\\\" will \
be suppressed during this calculation.\\\\\\\"\\\", \\\"MT\\\"]\\) \
\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \
ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/stop\\\", \
ButtonNote -> \\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG",
 CellChangeTimes->{
  3.526503900273711*^9, {3.5265039664914703`*^9, 3.526503979163772*^9}, 
   3.526504272558733*^9, 3.5265044273872757`*^9, {3.526504641904673*^9, 
   3.5265046757745113`*^9}, 3.5265047498122168`*^9, {3.527039235044092*^9, 
   3.527039262768598*^9}, 3.5270393741548147`*^9, 3.527039508322145*^9, 
   3.5271094072159557`*^9, 3.527109441993202*^9, 3.527112388627001*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.25224299365425307`", ",", "0.8745550533902388`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.4188491007617188`", ",", "0.9537995874844246`", ",", 
         "0.9624655183296763`", ",", "0.8641474797788584`", ",", 
         "0.8603759796449305`", ",", "0.1125542025358189`", ",", 
         "0.044948459385021004`", ",", "0.5147716898312111`", ",", 
         "0.2137568406746006`", ",", "0.4773053342714119`", ",", 
         "0.9078662624998157`", ",", "0.3660470639194133`", ",", 
         "0.42355125978777175`", ",", "0.37959058410769175`", ",", 
         "0.5514696595487883`", ",", "0.09020689585161358`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.14373851127486278`", ",", "0.8397137333056209`", ",", 
         "0.3281952421049137`", ",", "0.7386977454385669`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.3824112890271215`", ",", "0.9423928067724505`", ",", 
         "0.07595224845066059`", ",", "0.8641426920483282`", ",", 
         "0.9635621882654027`"}], "}"}], ",", "3", ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"1", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "2"}], "}"}]}], "}"}], ",", 
       "1.1134867301209843`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "14.00708099175073517045245949647325004969`20."}], ",", 
       RowBox[{
       "-", "0.929895467104480870804222914618504879144989387105104108054`20."}\
], ",", 
       RowBox[{"{", 
        RowBox[{
        "6.166779864579622`*^-11", ",", "8.584713030463518`*^-8", ",", 
         "4.35378672437649`*^-6", ",", "0.999995542256609`", ",", 
         "1.8047868454259258`*^-8"}], "}"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.9999952122694697`", ",", "0.10318620862047223`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.876039016752207`", ",", "0.06853827073596333`", ",", 
         "0.48522352243825867`", ",", "0.8894293679458716`", ",", 
         "0.39873368248079505`", ",", "0.16067200823614763`", ",", 
         "0.11917645851884535`", ",", "0.4658781081580999`", ",", 
         "0.019143098373103302`", ",", "0.6092023486873592`", ",", 
         "0.028969562667231764`", ",", "0.32213959688323707`", ",", 
         "0.17942936506748236`", ",", "0.2810071065824456`", ",", 
         "0.29027181722866485`", ",", "0.9397283078561156`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.23703655829503184`", ",", "0.20505485813178498`", ",", 
         "0.42612912518033663`", ",", "0.9761661195907129`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.24844333900700596`", ",", "0.09156812801080065`", ",", 
         "0.42613391291086683`", ",", "0.8729799109702406`", ",", 
         "0.37240432225479897`"}], "}"}], ",", 
       RowBox[{"-", "1"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "0"}], "}"}]}], "}"}], ",", 
       "1.9409103904726082`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "15.28368750142278316138977592470624315464`20."}], ",", 
       RowBox[{
       "-", "2.4553607389522542022323113600156818588525294676460563453916`20.\
"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.2902975851442835`", ",", "0.0865794984975393`", ",", 
         "0.2679531948376719`", ",", "0.2984944454945331`", ",", 
         "0.05667527602597222`"}], "}"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.983550543024369`", ",", "0.9736706397740039`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.8623578490386896`", ",", "0.8217339319537629`", ",", 
         "0.5176724348662691`", ",", "0.9545275414009007`", ",", 
         "0.2531555003513304`", ",", "0.792764369286531`", ",", 
         "0.195532837983032`", ",", "0.7750981763334183`", ",", 
         "0.9721483937688848`", ",", "0.5024925520578662`", ",", 
         "0.25580453012691645`", ",", "0.5380616180383865`", ",", 
         "0.7670935356370998`", ",", "0.0763634268775296`", ",", 
         "0.27963841053620364`", ",", "0.2896182790313805`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.6755254076262992`", ",", "0.6502295139666627`", ",", 
         "0.406658499565963`", ",", "0.9172139567765815`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.6524955503514619`", ",", "0.7093191234940546`", ",", 
         "0.42310795654159405`", ",", "0.9435433170025775`", ",", 
         "0.7901377013127722`"}], "}"}], ",", "1", ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"1", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "3"}], "}"}]}], "}"}], ",", 
       "1.905435521675325`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "11.32831236751618397682848038479055850015`20."}], ",", 
       RowBox[{
       "-", "0.2277737787526620436945848032479004604520334293229193478803`20.\
"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "6.8417519396785145`*^-22", ",", "0.0000750046442804222`", ",", 
         "0.008348758813694714`", ",", "0.9905452116791572`", ",", 
         "0.0010310248628676354`"}], "}"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.9890157756016769`", ",", "0.5369822009614418`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.09482082225376072`", ",", "0.7099026836922929`", ",", 
         "0.21391759926825857`", ",", "0.564833807192557`", ",", 
         "0.5923282701958945`", ",", "0.45409815356537647`", ",", 
         "0.6758559812298721`", ",", "0.7977402715554571`", ",", 
         "0.5159648433183649`", ",", "0.17445974302917286`", ",", 
         "0.3862377021984916`", ",", "0.12221486392915798`", ",", 
         "0.8657353293517022`", ",", "0.7678012434632099`", ",", 
         "0.46902374542191005`", ",", "0.4697193135776961`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.1564162058576475`", ",", "0.34469328692161577`", ",", 
         "0.5254804284193325`", ",", "0.6795816122649239`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.26883101431735573`", ",", "0.43925776524629084`", ",", 
         "0.5364646528176557`", ",", "0.14259941130348208`", ",", 
         "0.17401019206359503`"}], "}"}], ",", "3", ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"3", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "0"}], "}"}]}], "}"}], ",", 
       "1.322547053549397`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "16.91419207842376104731980216001690978994`20."}], ",", 
       RowBox[{
       "-", "1.5373231002829225221227219356459242003978707303622878843571`20.\
"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "1.952270053772229`*^-6", ",", "8.077629591025165`*^-6", ",", 
         "9.58222213783855`*^-6", ",", "0.9999802456832891`", ",", 
         "1.4219492806760118`*^-7"}], "}"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.5777656041109251`", ",", "0.5816819218677005`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.27525692798862145`", ",", "0.6466910723195249`", ",", 
         "0.7800253325554679`", ",", "0.06571707854933564`", ",", 
         "0.10079718495944856`", ",", "0.2604533701210334`", ",", 
         "0.65781046862631`", ",", "0.19998174919763353`", ",", 
         "0.33299594149623873`", ",", "0.7914296246991234`", ",", 
         "0.18809115504861385`", ",", "0.04356554333998602`", ",", 
         "0.988302654574623`", ",", "0.2659491962797908`", ",", 
         "0.50850954278369`", ",", "0.7747345290226303`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.5490448893283321`", ",", "0.7294845434621352`", ",", 
         "0.36591013148020785`", ",", "0.6007243369590353`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.8196898077743342`", ",", "0.4069374899127381`", ",", 
         "0.7881445273692828`", ",", "0.019042415091334725`", ",", 
         "0.5444328797857128`"}], "}"}], ",", "4", ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"2", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "1"}], "}"}]}], "}"}], ",", 
       "1.0081191948138148`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "19.34313592694807063487404780982366761705`20."}], ",", 
       RowBox[{
       "-", "2.1132031077260230621651024754678139588134335818169339833317`20.\
"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.000022316998590322517`", ",", "0.00002987207834315692`", ",", 
         "0.000023361291646674437`", ",", "0.000010213406814748316`", ",", 
         "0.9999142362246051`"}], "}"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.9533253365419991`", ",", "0.4436356948262642`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.4997930474721797`", ",", "0.35030872618750486`", ",", 
         "0.7533435873443656`", ",", "0.11063975333002547`", ",", 
         "0.7083634227730563`", ",", "0.16221757113889101`", ",", 
         "0.7097780440043795`", ",", "0.12233709875540255`", ",", 
         "0.4424142264932655`", ",", "0.653708028355201`", ",", 
         "0.9350435149817492`", ",", "0.5732922094270705`", ",", 
         "0.7129296830311304`", ",", "0.28779789687499324`", ",", 
         "0.334319178022714`", ",", "0.7536024016527363`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.30599219311839226`", ",", "0.49965336950571043`", ",", 
         "0.3152767629313793`", ",", "0.2091695218670236`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.5457457755251791`", ",", "0.49153417469189564`", ",", 
         "0.3619514263893802`", ",", "0.7655338270407595`", ",", 
         "0.04595272805299946`"}], "}"}], ",", 
       RowBox[{"-", "1"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"2", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "2"}], "}"}]}], "}"}], ",", 
       "1.6086078390450145`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "12.3101340539096819435117130234233371266`20."}], ",", 
       RowBox[{
       "-", "0.2813598705400714071081642798240303672505496514256222485366`20.\
"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "9.963657940057643`*^-6", ",", "0.05105650161537801`", ",", 
         "0.9179003672846915`", ",", "0.031033146421734978`", ",", 
         "2.102025554180404`*^-8"}], "}"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.6548940737107339`", ",", "0.33758930527994313`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.9790078773654998`", ",", "0.8988297950406351`", ",", 
         "0.5325569749553314`", ",", "0.8951750787866776`", ",", 
         "0.3252998490102986`", ",", "0.9637862800588859`", ",", 
         "0.9592647655282609`", ",", "0.1822453957555472`", ",", 
         "0.037501952135305425`", ",", "0.6294671020361718`", ",", 
         "0.20566236387552458`", ",", "0.876253202637155`", ",", 
         "0.537848582629595`", ",", "0.3141903391047926`", ",", 
         "0.996492842008501`", ",", "0.33050742711197584`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.04631440793769935`", ",", "0.9522389127154124`", ",", 
         "0.23095901496774163`", ",", "0.28455469905897635`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.9050889594333086`", ",", "0.34363107367039775`", ",", 
         "0.5760649412570077`", ",", "0.9469653937790332`", ",", 
         "0.9260810820678089`"}], "}"}], ",", 
       RowBox[{"-", "1"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "4"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}]}], "}"}], ",", 
       "1.0435079663016764`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "15.10040708547712400094871503640498302931`20."}], ",", 
       RowBox[{
       "-", "1.1331153103297776505382306157353121298733393691836379258666`20.\
"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.0009549052061107885`", ",", "0.023314821338189268`", ",", 
         "0.3961627339861939`", ",", "0.5517639471911377`", ",", 
         "0.02780359227836824`"}], "}"}]}], "}"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"0.05179031499235569`", ",", "0.6007812330575102`", ",", 
       RowBox[{"{", 
        RowBox[{
        "0.4810149985708768`", ",", "0.0842432007734154`", ",", 
         "0.8695449192368084`", ",", "0.5632792809222048`", ",", 
         "0.851547896534705`", ",", "0.8785808368978908`", ",", 
         "0.9932917165996535`", ",", "0.02543069829260985`", ",", 
         "0.5373575574299123`", ",", "0.8820879948893898`", ",", 
         "0.6627842894876776`", ",", "0.9791162903549105`", ",", 
         "0.5851186447144999`", ",", "0.6511289799216482`", ",", 
         "0.3782295904287013`", ",", "0.07402733092160191`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.24148757104410223`", ",", "0.0750640386646405`", ",", 
         "0.43126419664966803`", ",", "0.147946248853793`"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "0.7966862924143396`", ",", "0.03155607236296418`", ",", 
         "0.37947388165731233`", ",", "0.5471650157962827`", ",", 
         "0.3156712938434628`"}], "}"}], ",", "1", ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"2", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"2", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "3"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "1"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "1"}], "}"}]}], "}"}], ",", 
       "1.509928962420504`"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "12.18069002977583338890371237249787757946`20."}], ",", 
       RowBox[{
       "-", "0.9217199769905877305913255891796143651641961106155568489357`20.\
"}], ",", 
       RowBox[{"{", 
        RowBox[{
        "3.50021544819994`*^-7", ",", "0.9999971164741511`", ",", 
         "2.374433979938206`*^-6", ",", "1.5842609086110492`*^-7", ",", 
         "6.442333735085451`*^-10"}], "}"}]}], "}"}]}], "}"}]}], 
  "}"}]], "Output",
 CellChangeTimes->{
  3.5265036349970503`*^9, 3.526503710869643*^9, 3.5265037416310883`*^9, {
   3.526503861456119*^9, 3.5265039050898848`*^9}, {3.52650396657545*^9, 
   3.5265039793968687`*^9}, 3.526504272845715*^9, 3.526504429453422*^9, {
   3.526504642058465*^9, 3.526504676251309*^9}, 3.526504753563985*^9, {
   3.527039238833959*^9, 3.527039264140767*^9}, 3.5270393755741*^9, 
   3.52703951149218*^9, 3.527109407288765*^9, 3.527109442373461*^9, 
   3.527112391336619*^9}]
}, Open  ]]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell["\<\
sparse \[Gamma] and \[Tau] SGD approximation\
\>", "Subsection",
 CellChangeTimes->{{3.526761298196866*^9, 3.526761309724696*^9}, {
  3.526762070516046*^9, 3.526762080342836*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"(", 
   RowBox[{
    RowBox[{"DSolve", "[", 
     RowBox[{
      RowBox[{"{", " ", 
       RowBox[{
        RowBox[{
         RowBox[{
          RowBox[{"\[Tau]", "'"}], "[", "t", "]"}], " ", "\[Equal]", " ", 
         RowBox[{"\[Eta]", " ", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{"\[Tau]0", " ", "+", " ", "t"}], ")"}], "^", 
           RowBox[{"(", 
            RowBox[{"-", "\[Chi]"}], ")"}]}], " ", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{"\[Gamma]", " ", "-", " ", 
             RowBox[{"\[Tau]", "[", "t", "]"}]}], ")"}], " ", "/", " ", 
           "\[Sigma]"}]}]}], ",", " ", 
        RowBox[{
         RowBox[{"\[Tau]", "[", "s", "]"}], " ", "\[Equal]", " ", 
         "\[Tau]s"}]}], " ", "}"}], ",", " ", 
      RowBox[{"\[Tau]", "[", "t", "]"}], ",", " ", "t"}], "]"}], " ", "//", 
    " ", "FullSimplify"}], ")"}], " ", "/.", " ", 
  RowBox[{"\[Tau]s", " ", "\[Rule]", " ", 
   RowBox[{"\[Tau]", "[", "s", "]"}]}]}]], "Input",
 CellChangeTimes->{{3.5267624523130074`*^9, 3.526762524716786*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"\[Tau]", "[", "t", "]"}], "\[Rule]", 
    RowBox[{"\[Gamma]", "+", 
     RowBox[{
      SuperscriptBox["\[ExponentialE]", 
       FractionBox[
        RowBox[{"\[Eta]", " ", 
         RowBox[{"(", 
          RowBox[{
           RowBox[{"-", 
            SuperscriptBox[
             RowBox[{"(", 
              RowBox[{"s", "+", "\[Tau]0"}], ")"}], 
             RowBox[{"1", "-", "\[Chi]"}]]}], "+", 
           SuperscriptBox[
            RowBox[{"(", 
             RowBox[{"t", "+", "\[Tau]0"}], ")"}], 
            RowBox[{"1", "-", "\[Chi]"}]]}], ")"}]}], 
        RowBox[{"\[Sigma]", " ", 
         RowBox[{"(", 
          RowBox[{
           RowBox[{"-", "1"}], "+", "\[Chi]"}], ")"}]}]]], " ", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"-", "\[Gamma]"}], "+", 
        RowBox[{"\[Tau]", "[", "s", "]"}]}], ")"}]}]}]}], "}"}], 
  "}"}]], "Output",
 CellChangeTimes->{{3.526762479439048*^9, 3.526762528098916*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"Solve", "[", 
   RowBox[{
    RowBox[{
     RowBox[{"(", 
      RowBox[{
       RowBox[{"D", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"Log", "[", 
           RowBox[{"PDF", "[", 
            RowBox[{
             RowBox[{"NormalDistribution", "[", 
              RowBox[{"\[Mu]\[Gamma]", ",", " ", "\[Sigma]\[Gamma]"}], "]"}], 
             ",", " ", "\[Gamma]"}], "]"}], "]"}], " ", "+", " ", 
          RowBox[{"Sum", "[", 
           RowBox[{
            RowBox[{"Log", "[", 
             RowBox[{"PDF", "[", 
              RowBox[{
               RowBox[{"NormalDistribution", "[", 
                RowBox[{"\[Gamma]", ",", " ", "\[Sigma]\[Tau]"}], "]"}], ",", 
               " ", 
               RowBox[{"\[Tau]", "[", 
                RowBox[{"[", "i", "]"}], "]"}]}], "]"}], "]"}], ",", " ", 
            RowBox[{"{", " ", 
             RowBox[{"i", ",", " ", "1", ",", " ", "n"}], " ", "}"}]}], 
           "]"}]}], ",", " ", "\[Gamma]"}], "]"}], " ", "//", " ", 
       "FullSimplify"}], ")"}], " ", "\[Equal]", " ", "0"}], ",", " ", 
    "\[Gamma]"}], "]"}], " ", "//", " ", "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{
     RowBox[{"%", " ", "/.", " ", 
      RowBox[{"\[Mu]\[Gamma]", " ", "\[Rule]", " ", 
       RowBox[{"(", 
        RowBox[{"k", " ", "-", " ", 
         RowBox[{"1", "/", "2"}]}], ")"}]}]}], " ", "/.", " ", 
     RowBox[{"\[Sigma]\[Gamma]", " ", "\[Rule]", " ", "1"}]}], " ", "/.", " ", 
    RowBox[{"\[Sigma]\[Tau]", " ", "\[Rule]", " ", "1"}]}], " ", "/.", " ", 
   RowBox[{"n", " ", "\[Rule]", " ", 
    RowBox[{"Subscript", "[", 
     RowBox[{"n", ",", " ", "\[Gamma]"}], "]"}]}]}], " ", "//", " ", 
  "Quiet"}]}], "Input",
 CellChangeTimes->{{3.526761832066247*^9, 3.52676192775576*^9}, {
  3.526762297076962*^9, 3.526762299771537*^9}, {3.526762405076324*^9, 
  3.5267624185879393`*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{"\[Gamma]", "\[Rule]", 
    FractionBox[
     RowBox[{
      RowBox[{"\[Mu]\[Gamma]", " ", 
       SuperscriptBox["\[Sigma]\[Tau]", "2"]}], "+", 
      RowBox[{
       SuperscriptBox["\[Sigma]\[Gamma]", "2"], " ", 
       RowBox[{
        UnderoverscriptBox["\[Sum]", 
         RowBox[{"i", "=", "1"}], "n"], 
        RowBox[{
        "\[Tau]", "\[LeftDoubleBracket]", "i", 
         "\[RightDoubleBracket]"}]}]}]}], 
     RowBox[{
      RowBox[{"n", " ", 
       SuperscriptBox["\[Sigma]\[Gamma]", "2"]}], "+", 
      SuperscriptBox["\[Sigma]\[Tau]", "2"]}]]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{{3.526761871018959*^9, 3.526761893781703*^9}, 
   3.526761930769979*^9, 3.5267623049442244`*^9, {3.526762414406302*^9, 
   3.52676242127247*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{"\[Gamma]", "\[Rule]", 
    FractionBox[
     RowBox[{
      RowBox[{"-", 
       FractionBox["1", "2"]}], "+", "k", "+", 
      RowBox[{
       UnderoverscriptBox["\[Sum]", 
        RowBox[{"i", "=", "1"}], 
        SubscriptBox["n", "\[Gamma]"]], 
       RowBox[{
       "\[Tau]", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}]}], 
     RowBox[{"1", "+", 
      SubscriptBox["n", "\[Gamma]"]}]]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{{3.526761871018959*^9, 3.526761893781703*^9}, 
   3.526761930769979*^9, 3.5267623049442244`*^9, {3.526762414406302*^9, 
   3.5267624212747793`*^9}}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["\[Kappa] and log\[Alpha]", "Subsection",
 CellChangeTimes->{{3.526761976097507*^9, 3.526761981570684*^9}}],

Cell["\<\
do normal SGD step for \[Kappa] after determining log\[Alpha]\
\>", "Text",
 CellChangeTimes->{{3.52676204176691*^9, 3.526762053495696*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell["\<\
sparse \[Rho] and log\[Lambda] SGD approximation\
\>", "Subsection",
 CellChangeTimes->{{3.526762109922419*^9, 3.5267621149384327`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"(", 
   RowBox[{
    RowBox[{"DSolve", "[", 
     RowBox[{
      RowBox[{"{", " ", 
       RowBox[{
        RowBox[{
         RowBox[{
          RowBox[{"log\[Lambda]", "'"}], "[", "t", "]"}], " ", "\[Equal]", 
         " ", 
         RowBox[{"\[Eta]", " ", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{"\[Tau]0", " ", "+", " ", "t"}], ")"}], "^", 
           RowBox[{"(", 
            RowBox[{"-", "\[Chi]"}], ")"}]}], " ", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{"\[Rho]", " ", "-", " ", 
             RowBox[{"log\[Lambda]", "[", "t", "]"}]}], ")"}], " ", "/", " ", 
           "\[Sigma]"}]}]}], ",", " ", 
        RowBox[{
         RowBox[{"log\[Lambda]", "[", "s", "]"}], " ", "\[Equal]", " ", 
         "log\[Lambda]s"}]}], " ", "}"}], ",", " ", 
      RowBox[{"log\[Lambda]", "[", "t", "]"}], ",", " ", "t"}], "]"}], " ", "//",
     " ", "FullSimplify"}], ")"}], " ", "/.", " ", 
  RowBox[{"log\[Lambda]s", " ", "\[Rule]", " ", 
   RowBox[{"log\[Lambda]", "[", "s", "]"}]}]}]], "Input",
 CellChangeTimes->{{3.5267625381226053`*^9, 3.526762572674986*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"log\[Lambda]", "[", "t", "]"}], "\[Rule]", 
    RowBox[{"\[Rho]", "+", 
     RowBox[{
      SuperscriptBox["\[ExponentialE]", 
       FractionBox[
        RowBox[{"\[Eta]", " ", 
         RowBox[{"(", 
          RowBox[{
           FractionBox[
            SuperscriptBox[
             RowBox[{"(", 
              RowBox[{"s", "+", "\[Tau]0"}], ")"}], 
             RowBox[{"1", "-", "\[Chi]"}]], 
            RowBox[{"1", "-", "\[Chi]"}]], "+", 
           FractionBox[
            SuperscriptBox[
             RowBox[{"(", 
              RowBox[{"t", "+", "\[Tau]0"}], ")"}], 
             RowBox[{"1", "-", "\[Chi]"}]], 
            RowBox[{
             RowBox[{"-", "1"}], "+", "\[Chi]"}]]}], ")"}]}], "\[Sigma]"]], 
      " ", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"-", "\[Rho]"}], "+", 
        RowBox[{"log\[Lambda]", "[", "s", "]"}]}], ")"}]}]}]}], "}"}], 
  "}"}]], "Output",
 CellChangeTimes->{3.5267625749829283`*^9, 3.526763291861526*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"Solve", "[", 
   RowBox[{
    RowBox[{
     RowBox[{"(", 
      RowBox[{
       RowBox[{"D", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"Log", "[", 
           RowBox[{"PDF", "[", 
            RowBox[{
             RowBox[{"NormalDistribution", "[", 
              RowBox[{"\[Mu]\[Rho]", ",", " ", "\[Sigma]\[Rho]"}], "]"}], ",",
              " ", "\[Rho]"}], "]"}], "]"}], " ", "+", " ", 
          RowBox[{"Sum", "[", 
           RowBox[{
            RowBox[{"Log", "[", 
             RowBox[{"PDF", "[", 
              RowBox[{
               RowBox[{"NormalDistribution", "[", 
                RowBox[{"\[Rho]", ",", " ", "\[Sigma]log\[Lambda]"}], "]"}], 
               ",", " ", 
               RowBox[{"log\[Lambda]", "[", 
                RowBox[{"[", "i", "]"}], "]"}]}], "]"}], "]"}], ",", " ", 
            RowBox[{"{", " ", 
             RowBox[{"i", ",", " ", "1", ",", " ", "n"}], " ", "}"}]}], 
           "]"}]}], ",", " ", "\[Rho]"}], "]"}], " ", "//", " ", 
       "FullSimplify"}], ")"}], " ", "\[Equal]", " ", "0"}], ",", " ", 
    "\[Rho]"}], "]"}], " ", "//", " ", "Quiet"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{
     RowBox[{"%", " ", "/.", " ", 
      RowBox[{"\[Mu]\[Rho]", " ", "\[Rule]", " ", "0"}]}], " ", "/.", " ", 
     RowBox[{"\[Sigma]\[Rho]", " ", "\[Rule]", " ", "1"}]}], " ", "/.", " ", 
    RowBox[{"\[Sigma]log\[Lambda]", " ", "\[Rule]", " ", "1"}]}], " ", "/.", 
   " ", 
   RowBox[{"n", " ", "\[Rule]", " ", 
    RowBox[{"Subscript", "[", 
     RowBox[{"n", ",", " ", "\[Rho]"}], "]"}]}]}], " ", "//", " ", 
  "Quiet"}]}], "Input",
 CellChangeTimes->{{3.526762157649597*^9, 3.5267623076209173`*^9}, {
  3.52676235406888*^9, 3.526762421996922*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{"\[Rho]", "\[Rule]", 
    FractionBox[
     RowBox[{
      RowBox[{"\[Mu]\[Rho]", " ", 
       SuperscriptBox["\[Sigma]log\[Lambda]", "2"]}], "+", 
      RowBox[{
       SuperscriptBox["\[Sigma]\[Rho]", "2"], " ", 
       RowBox[{
        UnderoverscriptBox["\[Sum]", 
         RowBox[{"i", "=", "1"}], "n"], 
        RowBox[{
        "log\[Lambda]", "\[LeftDoubleBracket]", "i", 
         "\[RightDoubleBracket]"}]}]}]}], 
     RowBox[{
      SuperscriptBox["\[Sigma]log\[Lambda]", "2"], "+", 
      RowBox[{"n", " ", 
       SuperscriptBox["\[Sigma]\[Rho]", "2"]}]}]]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{
  3.526762199404971*^9, 3.526762247775899*^9, {3.526762285546427*^9, 
   3.526762311157613*^9}, {3.5267623610468273`*^9, 3.5267624248223543`*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{"\[Rho]", "\[Rule]", 
    FractionBox[
     RowBox[{
      UnderoverscriptBox["\[Sum]", 
       RowBox[{"i", "=", "1"}], 
       SubscriptBox["n", "\[Rho]"]], 
      RowBox[{
      "log\[Lambda]", "\[LeftDoubleBracket]", "i", 
       "\[RightDoubleBracket]"}]}], 
     RowBox[{"1", "+", 
      SubscriptBox["n", "\[Rho]"]}]]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{
  3.526762199404971*^9, 3.526762247775899*^9, {3.526762285546427*^9, 
   3.526762311157613*^9}, {3.5267623610468273`*^9, 3.526762424824078*^9}}]
}, Open  ]]
}, Open  ]]
}, Open  ]]
},
WindowSize->{640, 750},
WindowMargins->{{229, Automatic}, {Automatic, 0}},
ShowSelection->True,
FrontEndVersion->"7.0 for Mac OS X x86 (32-bit) (February 18, 2009)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[567, 22, 118, 1, 67, "Section"],
Cell[CellGroupData[{
Cell[710, 27, 100, 1, 34, "Subsection"],
Cell[813, 30, 9060, 240, 478, "Input"],
Cell[CellGroupData[{
Cell[9898, 274, 3046, 77, 103, "Input"],
Cell[12947, 353, 8591, 210, 528, "Output"]
}, Open  ]]
}, Closed]],
Cell[CellGroupData[{
Cell[21587, 569, 96, 1, 26, "Subsection"],
Cell[21686, 572, 4882, 109, 343, "Input"],
Cell[CellGroupData[{
Cell[26593, 685, 264, 3, 24, "Subsubsection"],
Cell[CellGroupData[{
Cell[26882, 692, 8895, 198, 433, "Input"],
Cell[35780, 892, 19137, 454, 1173, "Output"]
}, Open  ]]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[54978, 1353, 165, 2, 26, "Subsection"],
Cell[55146, 1357, 4339, 93, 298, "Input"],
Cell[CellGroupData[{
Cell[59510, 1454, 310, 4, 24, "Subsubsection"],
Cell[CellGroupData[{
Cell[59845, 1462, 15117, 334, 868, "Input"],
Cell[74965, 1798, 20323, 484, 1063, "Output"]
}, Open  ]]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[95349, 2289, 320, 4, 27, "Subsection"],
Cell[95672, 2295, 5725, 146, 343, "Input"],
Cell[CellGroupData[{
Cell[101422, 2445, 357, 5, 24, "Subsubsection"],
Cell[CellGroupData[{
Cell[101804, 2454, 11886, 259, 703, "Input"],
Cell[113693, 2715, 16415, 380, 838, "Output"]
}, Open  ]]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[130169, 3102, 301, 4, 27, "Subsection"],
Cell[130473, 3108, 2061, 45, 163, "Input"],
Cell[CellGroupData[{
Cell[132559, 3157, 358, 5, 24, "Subsubsection"],
Cell[CellGroupData[{
Cell[132942, 3166, 8682, 188, 508, "Input"],
Cell[141627, 3356, 1681, 28, 140, "Message"],
Cell[143311, 3386, 1685, 28, 140, "Message"],
Cell[144999, 3416, 1683, 28, 140, "Message"],
Cell[146685, 3446, 777, 13, 41, "Message"],
Cell[147465, 3461, 20115, 484, 1063, "Output"]
}, Open  ]]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[167641, 3952, 359, 5, 27, "Subsection"],
Cell[168003, 3959, 6058, 135, 358, "Input"],
Cell[CellGroupData[{
Cell[174086, 4098, 405, 5, 24, "Subsubsection"],
Cell[CellGroupData[{
Cell[174516, 4107, 9901, 215, 523, "Input"],
Cell[184420, 4324, 1894, 32, 140, "Message"],
Cell[186317, 4358, 1890, 31, 140, "Message"],
Cell[188210, 4391, 1707, 28, 134, "Message"],
Cell[189920, 4421, 979, 16, 41, "Message"],
Cell[190902, 4439, 18413, 438, 1050, "Output"]
}, Open  ]]
}, Closed]]
}, Closed]],
Cell[CellGroupData[{
Cell[209376, 4884, 189, 4, 26, "Subsection"],
Cell[CellGroupData[{
Cell[209590, 4892, 1091, 29, 43, "Input"],
Cell[210684, 4923, 1001, 30, 54, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[211722, 4958, 1915, 48, 103, "Input"],
Cell[213640, 5008, 808, 22, 53, "Output"],
Cell[214451, 5032, 658, 18, 62, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[215158, 5056, 112, 1, 35, "Subsection"],
Cell[215273, 5059, 150, 3, 26, "Text"]
}, Open  ]],
Cell[CellGroupData[{
Cell[215460, 5067, 146, 3, 35, "Subsection"],
Cell[CellGroupData[{
Cell[215631, 5074, 1141, 30, 58, "Input"],
Cell[216775, 5106, 1036, 31, 63, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[217848, 5142, 1773, 45, 103, "Input"],
Cell[219624, 5189, 820, 22, 54, "Output"],
Cell[220447, 5213, 573, 16, 59, "Output"]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}
]
*)

(* End of internal cache information *)
